beautypg.com

Document.reorderscene() – Adobe Extending Flash Professional CS5 User Manual

Page 151

background image

129

EXTENDING FLASH PROFESSIONAL

Document object

Last updated 5/2/2011

Usage

document.renameScene(name)

Parameters

name

A string that specifies the new name of the scene.

Returns
A Boolean value:

true

if the name is changed successfully;

false

otherwise. If the new name is not unique, for

example, the method returns

false

.

Description
Method; renames the currently selected scene in the Scenes panel. The new name for the selected scene must be unique.

Example
The following example renames the current scene to

"new name"

:

var success = fl.getDocumentDOM().renameScene("new name");

document.reorderScene()

Availability
Flash MX 2004.

Usage

document.reorderScene(sceneToMove, sceneToPutItBefore)

Parameters

sceneToMove

An integer that specifies which scene to move, with 0 (zero) being the first scene.

sceneToPutItBefore

An integer that specifies the scene before which you want to move the scene specified by

sceneToMove. Specify 0 (zero) for the first scene. For example, if you specify 1 for sceneToMove and 0 for
sceneToPutItBefore, the second scene is placed before the first scene. Specify -1 to move the scene to the end.

Returns
Nothing.

Description
Method; moves the specified scene before another specified scene.

Example
The following example moves the second scene to before the first scene:

fl.getDocumentDOM().reorderScene(1, 0);

This manual is related to the following products: