beautypg.com

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

Page 449

background image

427

EXTENDING FLASH CS4 PROFESSIONAL

SymbolInstance object

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

:

fl.getDocumentDOM().selection[0].shortcut = "Ctrl+i";

symbolInstance.silent

Availability
Flash MX 2004.