Nextscene() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

nextScene()

Availability
Flash 2.
Usage
nextScene() : Void
Parameters
None.
Returns
Nothing.
Description
Function; sends the playhead to Frame 1 of the next scene.
Example
In the following example, when a user clicks the button that is created at runtime, the playhead is
sent to Frame 1 of the next scene. Create two scenes, and enter the following ActionScript on
Frame 1 of Scene 1.
stop();
if (init == undefined) {
this.createEmptyMovieClip("nextscene_mc", this.getNextHighestDepth());
nextscene_mc.createTextField("nextscene_txt", this.getNextHighestDepth(),
200, 0, 100, 22);
nextscene_mc.nextscene_txt.autoSize = true;
nextscene_mc.nextscene_txt.border = true;
nextscene_mc.nextscene_txt.text = "Next Scene";
this.createEmptyMovieClip("prevscene_mc", this.getNextHighestDepth());
prevscene_mc.createTextField("prevscene_txt", this.getNextHighestDepth(),
00, 0, 100, 22);
prevscene_mc.prevscene_txt.autoSize = true;
prevscene_mc.prevscene_txt.border = true;
prevscene_mc.prevscene_txt.text = "Prev Scene";
nextscene_mc.onRelease = function() {
nextScene();
};
prevscene_mc.onRelease = function() {
prevScene();
};
init = true;
}
Make sure you place a
See also
prevScene()
646
Chapter 2: ActionScript Language Reference
ActionScript Language Reference
action on Frame 1 of Scene 2.
stop()
CHAPTER 2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents