Solved

Flash actionscript in as2 animation

Posted on 2011-09-30
1
469 Views
Last Modified: 2012-05-12
I need to create an arrow that continually spins until a user rolls the mouse over one of 8 points around the outside of the spinning area. When the user rolls over one of these areas the arrow spins around and stops back on the specific area the user has rolled over. When the user moves off the area the arrow starts spinning again.

AS2

Created a rotate function
 onEnterFrame = function () {
MyMovieClip._rotation -=10;
};

Any help or direction would be awesome

Regards
James
0
Comment
Question by:skyscream
1 Comment
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36893079
var t:MovieClip = _root.createEmptyMovieClip("triangle", _root.getNextHighestDepth());
t.beginFill(0x000099);
t.lineStyle(2, 0x000033, 100);
t.moveTo(-50, 50);
t.lineTo(0, -50);
t.lineTo(50, 50);
t.endFill();
t._x = 300;
t._y = 100;
t.onRollOver = function():Void{
      this.onEnterFrame = function():Void{
         this._rotation += 5;
      };
};
t.onRollOut = function():Void{
      delete this.onEnterFrame;
};


0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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.

708 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