Solved

ActionScript: rotate movie clip

Posted on 2002-05-22
4
2,108 Views
Last Modified: 2012-06-27
hi all,

ActionScript has predefined method to "drag" a movie clip (to move it). But how to rotate a movie clip by just dragging it? For example, when both the Ctrl key  and the left mouse button are pressed, the user means to rotate the movie clip instead of dragging it.

 thx.
0
Comment
Question by:idOle
  • 2
4 Comments
 
LVL 6

Expert Comment

by:rootdir
ID: 7028644
_rotation is the property available with objects. You have assign positive int. value to this property.

Set Variable "spin" = Get Property ("/mc", _rotation)
Set Variable "spin" = int (spin+10)
Set Property ("/mc",_rotation) = spin
See this example you will get better idea of drag and rotation

http://www.macromedia.com/support/flash/action_scripts/actionscript_tutorial/index.html

Cheers
RootDir
0
 
LVL 23

Accepted Solution

by:
Zeffer earned 100 total points
ID: 7028710
rootdir
why not just assume idOle is using MX and send them
to the tutorial which comes with it?

It would save a lot of time not downloading all that
stuff from Macromedia!:)

Another spin on rotation using actionScript with buttons,idOle, is at..
http://www.the-stickman.com/tutorials/f4rotatingchicken.shtml
Z
0
 
LVL 6

Expert Comment

by:rootdir
ID: 7030342
Why dont you address your comments to asker? I am not making un-necessary assumtions if asker did not pointed his/her requirments.

Above code is useful for flash 4 also, which I found on macromedia site. I thought which is correct for this question. If you are getting any problem with macromedia site, please address your problems to them not me. And if you have any problem with me address it to EE community.
0
 

Author Comment

by:idOle
ID: 8191162
Hi folks, sorry for not getting back nooner:) I was in a big move! And it seemed my humble actionscripting skill has been moving to another stage now. seems Zeffer's tutorial is more relevant to the original question becaue it addressed how _rotation property changed under a mouse release (except only in a seperate MC instance):)

I appreciate all of the help and I am sorry I can only give points to one answer.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Action Script commands 5 234
Flash player plugin 13 7 324
Failed download 57 551
Virus or Outlook 2007 problem, how to tell? 8 76
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now