Jason, yes, indeed you should be able to use Point.polar() it should
of course give the same result as long you give the angle in radians ;)
OK, so just curious, why all the trig? Converting angles to radians and
vice versa is easy enough.
Jason Merrill
Bank of America Global Learning
it depends on your registration point for each clip.
If it is at the bottom centre, than just set the x and y have it be
rotated by degree - 90
W.R. de Boer wrote:
Hello,
I am currently working on a little flash project where I would like to
place the sprites or elements on the line or
If you put the circle and the sprites of building in a movieclip and then
rotate the MC, they should stick to the circle, i think.
Or, keep the variable of the angles and then keep increasing the angles of
all the sprites for the same amount. (angle1++, angle2++, angle3++)
Or, since the angle of
Rotate the sprite the same as the angle your using. So if it is at the top
of the circle use 90 degrees, if it is half way between the equator and the
north pole then 45 degrees etc...
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
Weyert,
Here's my approach. Set the registration of the sprites (buildings)
to the bottom center and then use the following to determine the
rotation:
var rotation = (180 - angle);
Hope this helps.
Tony
On Mon, Nov 9, 2009 at 10:41 AM, W.R. de Boer w...@innerfuse.biz wrote:
Hello,
I am
Thanks, people. I am currently generating the movieclips at runtime
based on an embedded png file so the origin is always the top left
corner. I suppose I could descend from the Sprite-class and override
the x,y settings to correct the given x, y position. I suppose I will
first try out
After a bike ride down hill to the supermarket and cooking I just
tried out all your suggestions and I have to say it appears to work!
Really nice, only the problem I am currently happening is the issue
when I am creating sprites dynamically during runtime the origin is
not in the bottom
hi Wyert,
If this is the kind of thing you might do more than once then I strongly
recommend checking out the 'hype' AS3 framework from Joshua Davis and
Branden Hall.
http://hype.joshuadavis.com
There's a very approachable set of intro videos here:
http://www.vimeo.com/channels/hype
C:
I highly recommend pastebin for sharing code online:
http://pastebin.com/
You can set the syntax highlighting to Actionscript. Makes it much easier to
read. :)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
hi this is the calculation i used for something very similar. dynamic text
layed out round a circle (picture attached), although it doesn't take into
account re-registering it so it is top left registration:
function makeNames() { for (var i:int=0; ifilmNames.length; i++) {
Before I am updating the positions as calculated the trigonometry
formulas.
I haven't been following this thread, but has using the Point.polar()
method been mentioned yet?
Jason Merrill
Bank of America Global Learning
Learning Performance Soluions
Join the Bank of America Flash
wow that came across as one big line with no breaks. i guess the good luck is in
reference to being able to read it.
David Hunter wrote:
hi this is the calculation i used for something very similar. dynamic text
layed out round a circle (picture attached), although it doesn't take into
Yeah, that's a nice big line of code. And yes, I have seen the HYPE
framework and looks really interesting but I don't think it's having
functionality for the thing I wanted.
Jason, yes, indeed you should be able to use Point.polar() it should
of course give the same result as long you
not sure what went wrong there, terribly embarrassing!
i'll try steven sacks suggestion of pastebin:http://pastebin.com/m3e6210bf(i've
probably got that wrong too - its been one of those days)
hope it helps,
david
Subject: Re: [Flashcoders] Placing sprites on the circumference of a circle
Yeah, I think it's working now! The final code for now (it's bedtime!)
is as follows:
http://www.friendpaste.com/23ImSCDq41zmXXmYUqtT0x
Tomorrow, I will experiment with the code from David. Code on pastebin
looks all fine. Thanks.
Weyert
___
15 matches
Mail list logo