Simple Action Script Button Code
Here you go. Use this code as starter for controlling buttons. Note that your functions must be uniquely named (and match) and that your button instance name must match what you use in your AS.
import flash.events.MouseEvent;
// Simple Button Action
function onClick(event:MouseEvent):void
{
gotoAndPlay(1);
simpleMovie.gotoAndStop(1);
}
replay_btn2.addEventListener(MouseEvent.CLICK, onClick);
Advertisement
