Extending Flash |
|
|
|
| Objects > flash object (fl) > fl.createDocument() | |||
Flash MX 2004.
fl.createDocument([docType])
docType A string that specifies the type of document to create. Acceptable values are "timeline", "presentation", and "application". The default value is "timeline", which has the same effect as choosing File > New > Flash File (ActionScript 3.0). This parameter is optional.
|
NOTE |
This method doesn't support the creation of a Flash Mobile document. |
The Document object for the newly created document, if the method is successful. If an error occurs, the value is undefined.
Method; opens a new document and selects it. Values for size, resolution, and color are the same as the current defaults.
The following example creates different types of documents:
// Create two Timeline-based Flash documents.
fl.createDocument();
fl.createDocument("timeline");
// Create a Slide Presentation document.
fl.createDocument("presentation");
// Create a Form Application document.
fl.createDocument("application");
|
|
|
|