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
Solved

ActionScript: rotate movie clip

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

809 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