At 5/31/09 05:48 AM, PacoNixon wrote:
on(release) {
gotoAndStop(X);
}
Good job in reading his post that he's using AS3. Either use what he said and go to the properties panel (it should be at the bottom but if you can't see it then hit Ctrl + F3). Where it says 'Publish:' and has a button labelled settings, click the button. You'll see an actionscript field with a drop down menu, change that to Actionscript 2.0 and you're away.
Alternatively, leave it on AS3 and use the following code. First give your button an instance name, in this example I've called mine myBtn:
stop();
function replayButton(e:MouseEvent)
{
gotoAndStop(2);
}
myBtn.addEventListener(MouseEvent.CLICK, replayButton);
If you're using AS3 then the code goes in the main timeline. If you're using AS2 and the code that the other person provided then the code goes in the button itself (select it and hit F9).