ActionScript 3 on Flash CS4?

Phantom

New member
So i'm pretty new to the world of Actionscript...

....all i need is a something simple that will let me create a button, clicking of this button leads to the start of an animation in the Flash timeline, say for instance an animation in 'Layer 1'.
I've found small tutorials on actionscript that show how to link a button to a hyperlink, but i'm not sure how to adapt this to do what i've described above

....any help??

Cheers

Sope tha
 
ActionScript 3:
(buttonName).addEventListener( Mouse.CLICK, onButtonClick);
function onButtonClick(event:MouseEvent):void{
var x = (Slide number on timeline);
goToAndStop( x );
// If you want a movie clip, follow the other respondent's lead.
}
Good Luck!
If you need further assistance/advice, feel free to contact me.
 
May this will help you:

//Leaf_introduction is the instance name of the movie clip where i want to attach te eventhandler
Leaf_introduction.addEventListener(MouseEvent.CLICK, mouseDownHandler);

//The handler function
function mouseDownHandler(event:MouseEvent):void {
// Use this line if you want to preform the play action on an different time line than your current working timeline
MovieClip(Leaf_introduction).play();
// If you want to play the current time line
play();
}
 
Back
Top