Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get a line to pivot on it's end point? Like a clock. 1

Status
Not open for further replies.

JasonParr

Programmer
Jun 11, 2001
8
0
0
US
I am trying to creat a tumbler for a raffel drawing. I can get the tickets to spin on the inside of the tumbler, but when I try to make the hadle spin it moves in a circle. What I want to do is have it pivot in place like the hands of a circle. I am new to flash and don't have a real grasp of the action scripting. Any assistance or a point in the right direction would be appreciated.

Thanks,
Jason
 
Take the line and convert it to a movie clip. Then edit the clip and move the line so that it's end is on the cross that marks the registration point (ie so it's not centred which is the default position - you can also do this using the "align" panel).

From here any rotation you apply will give you the "clock hand" motion either by tweening or adding this code to the movie clip...

onClipEvent(enterFrame){
_rotation++;
} Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top