This content has been marked as final.
Show 4 replies
-
1. Re: Rotating clock arm on demand
clbeech Aug 24, 2007 7:55 AM (in response to Autumndiver)this is no problem, create a 'hand' mc with the registration point at the 'center' of the watch. then use something like:
hand_mc._rotation = 45;
you will need to determine how far you want to rotate the mc, for each different element or 'year' you need it to go to. and then just set the _rotation prop to that position when called. You can examine the rotation by using the 'align/info/transform' panel (transform) to check the rotation values visually. -
2. Re: Rotating clock arm on demand
Autumndiver Aug 24, 2007 8:08 AM (in response to Autumndiver)Thanks for the quick reply.
Your answer helped but is there a way I can animate it? instead of it just flicking around to the 'year' -
3. Re: Rotating clock arm on demand
clbeech Aug 24, 2007 8:21 AM (in response to Autumndiver)yes several ways, simplest might be to use the Tween class and call a tween when the user activates the sequence. supposing a button based user input, you could do something like the following, however this would be a 'smooth' rotation over 1 second (and an assumed a final position of 45 degrees): -
4. Re: Rotating clock arm on demand
clbeech Aug 24, 2007 9:01 AM (in response to clbeech)however if you wanted the hand to 'tick' you could use a setInterval event, like this: