< Day Day Up > |
Inheritance Element object > Instance object > CompiledClipInstance object Availability Flash MX 2004. Description The CompiledClipInstance object is a subclass of the Instance object. It is essentially an instance of a movie clip that has been converted to a compiled clip library item. (See Instance object.) Property summary for the CompiledClipInstance objectIn addition to the properties of the Instance object, the CompiledClipInstance object has the following properties:
compiledClipInstance.accNameAvailability Flash MX 2004. Usage compiledClipInstance.accName Description Property; a string that is equivalent to the Name field in the Accessibility panel. Screen readers identify objects by reading the name aloud. Example The following example gets and sets the accessibility name of the first selected object: // Get the name of the object. var theName = fl.getDocumentDOM().selection[0].accName; // Set the name of the object. fl.getDocumentDOM().selection[0].accName = 'Home Button'; compiledClipInstance.actionScriptAvailability Flash MX 2004. Usage compiledClipInstance.actionScript Description Property; a string that represents the ActionScript for this instance; equivalent to symbolInstance.actionScript. Example The following code assigns ActionScript to specified elements: // Assign some ActionScript to a specified Button compiled clip instance. fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0] .actionScript = "on(click) {trace('button is clicked');}"; // Assign some ActionScript to the currently selected Button compiled clip instance. fl.getDocumentDOM().selection[0].actionScript = "on(click) {trace('button is clicked');}"; compiledClipInstance.descriptionAvailability Flash MX 2004. Usage compiledClipInstance.description Description Property; a string that is equivalent to the Description field in the Accessibility panel. The description is read by the screen reader. Example The following example illustrates getting and setting the description property: // Get the description of the current selection. var theDescription = fl.getDocumentDOM().selection[0].description; // Set the description of the current selection. fl.getDocumentDOM().selection[0].description = "This is compiled clip number 1"; compiledClipInstance.forceSimpleAvailability Flash MX 2004. Usage compiledClipInstance.forceSimple Description Property; a Boolean value that enables and disables the children of the object to be accessible. This is equivalent to the inverse logic of the Make Child Objects Accessible setting in the Accessibility panel. If forceSimple is TRue, it is the same as the Make Child Objects Accessible option being unchecked. If forceSimple is false, it is the same as the Make Child Object Accessible option being checked. Example The following example illustrates getting and setting the forceSimple property: // Query if the children of the object are accessible. var areChildrenAccessible = fl.getDocumentDOM().selection[0].forceSimple; // Allow the children of the object to be accessible. fl.getDocumentDOM().selection[0].forceSimple = false; compiledClipInstance.shortcutAvailability Flash MX 2004. Usage compiledClipInstance.shortcut Description Property; a string that is equivalent to the Shortcut field in the Accessibility panel. The shortcut is read by the screen readers. This property is not available for dynamic text fields. Example The following example illustrates getting and setting the shortcut property: // Get the shortcut key of the object. var theShortcut = fl.getDocumentDOM().selection[0].shortcut; // Set the shortcut key of the object. fl.getDocumentDOM().selection[0].shortcut = "Ctrl+I"; compiledClipInstance.silentAvailability Flash MX 2004. Usage compiledClipInstance.silent Description Property; a Boolean value that enables or disables the accessibility of the object; equivalent to the inverse logic of Make Object Accessible setting in the Accessibility panel. That is, if silent is true, then Make Object Accessible is unchecked. If silent is false, then Make Object Accessible is checked. Example The following example illustrates getting and setting the silent property: // Query if the object is accessible. var isSilent =fl.getDocumentDOM().selection[0].silent; // Set the object to be accessible. fl.getDocumentDOM().selection[0].silent = false; compiledClipInstance.tabIndexAvailability Flash MX 2004. Usage compiledClipInstance.tabIndex Description Property; an integer that is equivalent to the Tab Index field in the Accessibility panel. Creates a tab order in which objects are accessed when the user presses the Tab key. Example The following example illustrates getting and setting the tabIndex property: // Get the tabIndex of the object. var theTabIndex = fl.getDocumentDOM().selection[0].tabIndex; // Set the tabIndex of the object. fl.getDocumentDOM().sele ction[0].tabIndex = 1; |
< Day Day Up > |