Adobe Extending Flash Professional CS4 Uživatelský manuál Strana 335

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 560
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 334
313
EXTENDING FLASH CS4 PROFESSIONAL
library object
Property summary for the library object
The following property is available for the library object:
library.addItemToDocument()
Availability
Flash MX 2004.
Usage
library.addItemToDocument(position [, namePath])
Parameters
position A point that specifies the x,y position of the center of the item on the Stage.
namePath A string that specifies the name of the item. If the item is in a folder, you can specify its name and path using
slash notation. If namePath is not specified, the current library selection is used. This parameter is optional.
Returns
A Boolean value: true if the item is successfully added to the document; false otherwise.
Description
Method; adds the current or specified item to the Stage at the specified position.
Example
The following example adds the currently selected item to the Stage at the (3, 60) position:
fl.getDocumentDOM().library.addItemToDocument({x:3, y:60});
The following example adds the item Symbol1 located in folder1 of the library to the Stage at the (550, 485) position:
fl.getDocumentDOM().library.addItemToDocument({x:550.0, y:485.0}, "folder1/Symbol1");
library.addNewItem()
Availability
Flash MX 2004.
Usage
library.addNewItem(type [, namePath])
Parameters
type A string that specifies the type of item to create. The only acceptable values for type are "video", "movie clip",
"button", "graphic", "bitmap", "screen", and "folder" (so, for example, you cannot add a sound to the library
Property Description
library.items An array of Item objects in the library
Zobrazit stránku 334
1 2 ... 330 331 332 333 334 335 336 337 338 339 340 ... 559 560

Komentáře k této Příručce

Žádné komentáře