Document object
67
The following example adds the symbol
myMovieClip
from the current document’s library to the
current document:
var itemIndex = fl.getDocumentDOM().library.findItemIndex("myMovieClip");
var theItem = fl.getDocumentDOM().library.items[itemIndex];
fl.getDocumentDOM().addItem({x:0,y:0}, theItem);
The following example adds the symbol
myMovieClip
from the second document in the
documents array to the third document in the documents array:
var itemIndex = fl.documents[1].library.findItemIndex("myMovieClip");
var theItem = fl.documents[1].library.items[itemIndex];
fl.documents[2].addItem({x:0,y:0}, theItem);
document.addNewLine()
Availability
Flash MX 2004.
Usage
document.addNewLine(
startPoint
,
endpoint
)
Parameters
startpoint
A pair of floating point numbers that specify the
x
and
y
coordinates where the line
starts.
endpoint
A pair of floating point numbers that specify the
x
and
y
coordinates where the line
ends.
Returns
Nothing.
Description
Method; adds a new path between two points. The method uses the document’s current stroke
attributes and adds the path on the current frame and current layer. This method works in the
same way as clicking on the line tool and drawing a line.
Example
The following example adds a line between the specified starting point and ending point:
fl.getDocumentDOM().addNewLine({x:216.7, y:122.3}, {x:366.8, y:165.8});
document.addNewOval()
Availability
Flash MX 2004.
Usage
document.addNewOval(
boundingRectangle
[,
bSuppressFill
[,
bSuppressStroke
]] )
Содержание FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Страница 1: ...Flash JavaScript Dictionary ...
Страница 16: ...16 Contents ...
Страница 40: ...40 Chapter 2 Top level functions ...
Страница 368: ...368 Chapter 3 Objects ...
Страница 386: ...386 Chapter 4 C Level Extensibility ...