[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ActionScript: rotate movie clip

Posted on 2002-05-22
4
Medium Priority
?
2,118 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 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

825 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