Example
The following example stores the array of currently selected library items (in this case, several
audio files) in the
selItems
audio file in the array to
var selItems = fl.getDocumentDOM().library.getSelectedItems();
selItems[0].sampleRate = "11 kHz";
library.importEmbeddedSWF()
Availability
Flash MX 2004.
Usage
library.importEmbeddedSWF( linkageName, swfData [, libName] )
Parameters
A string that provides the name of the SWF linkage of the root movie clip.
linkageName
An array of binary SWF data, which comes from an external library or DLL.
swfData
A string that specifies the library name for the created item. If the name is already
libName
used, the method creates an alternate name. This parameter is optional.
Returns
Nothing.
Description
Method; imports a Shockwave (SWF) file into the library as a compiled clip. Unlike File >
Import > SWF, this method lets you embed a compiled SWF file inside the library. There is
no corresponding user interface functionality, and this method must be used with an external
library or DLL (see
Chapter 3, "C-Level Extensibility," on page
The SWF file that you are importing must have one top-level movie clip that contains all the
content. That movie clip should have its linkage identifier set to the same value as the
parameter passed to this method.
linkageName
Example
The following example adds the SWF file with the
library as a compiled clip named Intro:
fl.getDocumentDOM().library.importEmbeddedSWF("MyMovie", swfData, "Intro");
variable and then changes the
:
"11 kHz"
sampleRate
533).
value of MyMovie to the
linkageName
property of the first
library object
319
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?
Questions and answers