User Guide

70 Chapter 3: Objects
Example
The following example adds a new rectangle with no round corners within the specified
coordinates.
flash.getDocumentDOM().addNewRectangle({left:0,top:0,right:100,bottom:100},0);
The following example adds a new rectangle with no round corners and without a fill.
flash.getDocumentDOM().addNewRectangle({left:0,top:0,right:100,bottom:100},0,
true);
The following example add a new rectangle no round corners and without a stroke.
flash.getDocumentDOM().addNewRectangle({left:0,top:0,right:100,bottom:100},0,
false, true);
document.addNewScene()
Availability
Flash MX 2004.
Usage
document.addNewScene( [name] )
Parameters
name
Specifies the name of the scene. If you do not specify a name, a new scene name is
generated.
Returns
A Boolean value: true if the scene is added successfully; false otherwise.
Description
Method; adds a new scene (Timeline object) as the next scene after the currently selected scene
and makes the new scene the currently selected scene. If the specified scene name already exists,
the scene is not added and the method returns an error.
Example
The following example adds a new scene named myScene after the current scene in the current
document. The variable
success will be true when the new scene is created; false otherwise
var success = flash.getDocumentDOM().addNewScene("myScene");
The following example adds a new scene using the default naming convention. If only one scene
exists, the newly created scene is named
"Scene 2".
fl.getDocumentDOM().addNewScene();