Solved

ActionScript: rotate movie clip

Posted on 2002-05-22
4
2,107 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

747 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

12 Experts available now in Live!

Get 1:1 Help Now