Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

Move Between Different Scenes with ActionScript 3

Many complicated Flash Movies have more than one scene. This Flash ActionScript tutorial shows how to move or navigate between different scenes.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

For some long and complex Flash animations, I like to split them into some scenes (e.g. Scene 1, Scene 2, Scene 3, etc.). You can use a more meaningful Scene name instead of number if you like. This Flash Actioncript tutorial shows how to moving between different scenes.

The completed Flash Movie of this ActionScript tutorial is shown as above. Please play around to see how it works.

Flash ActionScript Codes:

//This is Scene 1 Codes

stop();

// Go To Frame 1 of Scene 2 and Play Button
playScene2_btn.addEventListener(MouseEvent.CLICK, playScene2);

function playScene2(evt:Event) {

// Send the playhead to frame 1 of Scene 2 and play
gotoAndPlay(1, "Scene 2");

}

 

// Go To Frame 1 of Scene 2 and Stop Button
stopScene2_btn.addEventListener(MouseEvent.CLICK, stopScene2);

function stopScene2(evt:Event) {

// Send the playhead to frame 1 of “Scene 2” and stop
gotoAndStop(1, "Scene 2");

}

 

// This is Scene 2 Codes:

 

// Go To Frame 1 of Scene 1 and Stop Button
gotoScene1_btn.addEventListener(MouseEvent.CLICK, gotoScene1);

 

function gotoScene1(evt:Event) {

// Send the playhead to frame 1 of Scene 1 and stop
gotoAndStop(1, "Scene 1");

}

Download Flash Source File:

Flash Source File control-movie-clip-3.fla

Remarks:

This Flash ActionScript tutorial shows how to navigate or move between different scenes of Movieclip.