Forum Moderators: open
The problem is that I cannot get the first video to stop once the second video is clicked.
import flash.events.*;squash.addEventListener(MouseEvent.CLICK,squashClick);
function squashClick(event:MouseEvent):void {
gotoAndStop(2);
}
okra.addEventListener(MouseEvent.CLICK,okraClick);
function okraClick(event:MouseEvent):void {
gotoAndStop(3);
}
eggplant.addEventListener(MouseEvent.CLICK,eggplantClick);
function eggplantClick(event:MouseEvent):void {
gotoAndStop(4);
}
each button has an instance name of squash, okra, eggplant. I add the event listener and tell it to go to a certain frame when clicked.
myMovie.stop();
you might want to see if there is an easier implementation of your flash app so instead of having the movies on separate frames you dynamically load them with AS.