beautypg.com

Symbolinstance.loop, Symbolinstance.shortcut – Adobe Extending Flash Professional CS5 User Manual

Page 447

background image

425

EXTENDING FLASH PROFESSIONAL

SymbolInstance object

Last updated 5/2/2011

Example
The following example checks to see if the children of the object are accessible; a return value of

false

means the

children are accessible:

var areChildrenAccessible = fl.getDocumentDOM().selection[0].forceSimple;

The following example allows the children of the object to be accessible:

fl.getDocumentDOM().selection[0].forceSimple = false;

symbolInstance.loop

Availability
Flash MX 2004.

Usage

symbolInstance.loop

Description
Property; a string that, for graphic symbols, sets the same property as the Loop pop-up menu in the Property inspector.
For other types of symbols, this property is

undefined

. Acceptable values are

"loop"

,

"play once"

, and

"single

frame"

to set the graphic’s animation accordingly.

Example
The following example sets the first symbol in the first frame of the first layer in the timeline to

single frame

(display

one specified frame of the graphic timeline), as long as that symbol is a graphic:

fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].loop = 'single frame';

symbolInstance.shortcut

Availability
Flash MX 2004.

Usage

symbolInstance.shortcut

Description
Property; a string that is equivalent to the shortcut key associated with the symbol. This property is equivalent to the
Shortcut field in the Accessibility panel. This key is read by the screen readers. This property is not available for graphic
symbols.

Example
The following example stores the value for the shortcut key of the object in the

theShortcut

variable:

var theShortcut = fl.getDocumentDOM().selection[0].shortcut;

The following example sets the shortcut key of the object to

Ctrl+i

:

This manual is related to the following products: