?
Solved

ActionScript: rotate movie clip

Posted on 2002-05-22
4
Medium Priority
?
2,113 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
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.
Suggested Courses
Course of the Month12 days, 2 hours left to enroll

752 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