Here is the buttons within a scene that I was talking about.

Basically if you want to go from scene to scene, or within frames of a scene in a flash movie this is what you have to do.


stop();

button1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

    gotoAndStop(1, "Scene 2");

}

first there is a stop action, then using the instance name of your button you need to add a event listener, and create a function. In this case I create a function called mouseDownHandler. In this function I simple tell it gotoAndStop(1, “Scene 2”); In the arguments you need a frame and Scene, so in my case I am saying gotoAndStop([frame]1, “Scene 2″);

Here is a live example
[kml_flashembed publishmethod=”static” fversion=”9.0.0″ movie=”http://blog.hawaiiflash.org/wp-content/uploads/2010/03/buttons-within-a-scene.swf” width=”400″ height=”300″ targetclass=”flashmovie”]Get Adobe Flash player

[/kml_flashembed]

By |2009-04-09T20:17:51+00:00April 9th, 2009|