beautypg.com

Document.duplicatescene(), Document.duplicateselection() – Adobe Extending Flash Professional CS5 User Manual

Page 116

background image

94

EXTENDING FLASH PROFESSIONAL

Document object

Last updated 5/2/2011

Parameters

profileName

A string that specifies the unique name of the duplicated profile. If you do not specify a name, the

method uses the default name. This parameter is optional.

Returns
An integer that is the index of the new profile in the profile list. Returns -1 if the profile cannot be duplicated.

Description
Method; duplicates the currently active profile and gives the duplicate version focus.

Example
The following example duplicates the currently active profile and displays the index of the new profile in the Output
panel:

fl.trace(fl.getDocumentDOM().duplicatePublishProfile("dup profile"));

document.duplicateScene()

Availability
Flash MX 2004.

Usage

document.duplicateScene()

Parameters
None.

Returns
A Boolean value:

true

if the scene is duplicated successfully;

false

otherwise.

Description
Method; makes a copy of the currently selected scene, giving the new scene a unique name and making it the current
scene.

Example
The following example duplicates the second scene in the current document:

fl.getDocumentDOM().editScene(1); //Set the middle scene to current scene.

var success = fl.getDocumentDOM().duplicateScene();

document.duplicateSelection()

Availability
Flash MX 2004.

This manual is related to the following products: