Adobe Extending Flash Professional CS4 Manuel d'utilisateur Page 256

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 560
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 255
234
EXTENDING FLASH CS4 PROFESSIONAL
flash object (fl)
Parameters
instanceName A string that specifies the instance name of an item in the specified document.
document The Document object in which to search for the specified item.
Returns
An array of generic objects. Use the .obj property of each item in the array to get the object. The object has the
following properties:
keyframe, layer, timeline, and parent. You can use these properties to access the hierarchy
of the object. For more information on these properties and how to access them, see
fl.findObjectInDocByType().
You can also access methods and properties for the layer and timeline values; they are equivalent to the Layer object
and the Timeline object, respectively.
Description
Method; exposes elements in a document with instance names that match the specified text.
Note: In some cases, this method works only when run as a command from within a FLA file, not when you are currently
viewing or editing the JSFL file.
Example
The following example searches the current document for elements named "instance01" .
var nameToSearchFor = "instance01";
var doc = fl.getDocumentDOM();
var results = fl.findObjectInDocByName(nameToSearchFor, doc);
if (results.length > 0) {
alert("success, found " + results.length + " objects");
}
else {
alert("failed, no objects named " + nameToSearchFor + " found");
}
See also
fl.findObjectInDocByType()
fl.findObjectInDocByType()
Availability
Flash CS3 Professional.
Usage
fl.findObjectInDocByType(elementType, document)
Parameters
elementType A string that represents the type of element to search for. For acceptable values, see
element.elementType.
document The Document object in which to search for the specified item.
Vue de la page 255
1 2 ... 251 252 253 254 255 256 257 258 259 260 261 ... 559 560

Commentaires sur ces manuels

Pas de commentaire