beautypg.com

Screenoutline.copyscreenfromfile(), Screenoutline.currentscreen – Adobe Extending Flash Professional CS4 User Manual

Page 398

background image

376

EXTENDING FLASH CS4 PROFESSIONAL

ScreenOutline object

screenOutline.copyScreenFromFile()

Availability
Flash MX 2004.

Usage

screenOutline.copyScreenFromFile(fileURI [, screenName])

Parameters

fileURI

A string, expressed as a file:/// URI, that specifies a filename for the authoring file that contains the screens to

copy into the document.

screenName

The name of the screen to copy. If the screenName parameter is present, Flash copies that screen and its

children. If the screenName is not specified, Flash copies the whole document. This parameter is optional.

Returns
Nothing. If the file is not found or is not a valid FLA file, or if the specified screen is not found, an error is reported
and the script is cancelled.

Description
Method; inserts all the screens, or a named screen and its children, from a specified document under the currently
selected screen. If more than one screen is selected, the screen(s) are inserted under the last selected screen, as its
sibling.

Example
The following example copies the

slide1

screen from the myTarget.fla file on the Desktop into the current document

(substitute your user name for userName):

fl.getDocumentDOM().screenOutline.copyScreenFromFile("file:///C|/Documents and

Settings/userName/Desktop/myTarget.fla", "slide1");

screenOutline.currentScreen

Availability
Flash MX 2004.

Usage

screenOutline.currentScreen

Property

Description

screenOutline.currentScreen

A

Screen object

; the currently selected screen.

screenOutline.rootScreen

Read-only; the first screen in the screen outline.

screenOutline.screens

Read-only; the array of top-level Screen objects contained in the
document (see

Screen object

).