PDA

View Full Version : button play frame on timeline



donkeykong
September 23rd, 2009, 06:54 AM
Hi all

would anyone beable to direct me to a simple technote on how to play the timeline with a simple button

example:
in AS2 you could attached script to button something like

on MouseEvent {
gotoandplay(6);
}

thats all I am trying to do, but in AS3 how do I simply get a button when clicked to go to a frame and play.http://board.flashkit.com/board/images/smilies/confused.gif

many thanks for any help!

kunjan
September 23rd, 2009, 07:00 AM
Hello donkeykong,

its a very simple like below:

btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(e:MouseEvent)
{
gotoandplay(6);
}

Get Back to me If you have any problem

Regards,
Kunjan.