Extending Flash |
|
|
|
| Objects > Document object > document.importFile() | |||
Flash 8.
document.importFile(fileURI[,importToLibrary])
fileURI A string, expressed as a file:/// URI, that specifies the path of the file to import.
importToLibrary A Boolean value that specifies whether to import the file only into the document's library (true) or to also place a copy on the Stage (false). The default value is false.
A Boolean value that indicates whether the file was successfully imported.
Method; imports a file into a document. This method performs the same operation as the Import To Library or Import To Stage menu command. To import a publish profile, use document.importPublishProfile().
The following example lets the user browse for a file to import onto the Stage:
var dom = fl.getDocumentDOM();
var URI = fl.browseForFileURL("select", "Import File");
dom.importFile(URI);
document.importSWF(), fl.browseForFileURL()
|
|
|
|