Monday, April 9, 2012

Two Ways of Walking

(both methods are based up creating symbols and placing instances of those symbols on the stage)

moving the timeline:
btnInstanceName.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerA);
function mouseDownHandlerA(event:MouseEvent):void {
gotoAndStop(10);
}

commanding a movieClip to play:
buttonInstanceName.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerB);
function mouseDownHandlerB(event:MouseEvent):void {
movieClipInstanceName.play();
}

No comments:

Post a Comment