-
as3 and buttons
Hi again. Sorry to bombard you with questions but when I used as1 and imported a KM button there was an option to add AS to the button. That's not the case with as3 (or have I missed it?) - is the only way to add it via the frame or within the button frame?
If I could add this to a button maybe I can finally have my new_clock arms go backwards??
var direction:int = 1; //change to -1 to reverse rotation.
function onClick(event:MouseEvent):void{
var increment:int = 30 * direction;
DisplayObject(event.currentTarget).rotation += increment;
}
thanks,
ja
Last edited by jarnold; 01-06-2010 at 06:32 AM.
-
With AS3, you add the action to a main movie frame.
-
Thanks for the reply, Bob.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|