mc.curveTo(r+x, -Math.tan(Math.PI/8)*r+y, r+x, y);
}
An example is also in the drawingapi.fla file in the Samples\ActionScript\DrawingAPI. The
following list gives typical paths to this folder:
Windows: \Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\
Macintosh: HD/Applications/Macromedia Flash 8/Samples and Tutorials/Samples/
See also
beginFill (MovieClip.beginFill method)
(MovieClip.createEmptyMovieClip method)
lineStyle (MovieClip.lineStyle method)
moveTo (MovieClip.moveTo method)
_droptarget (MovieClip._droptarget property)
public _droptarget : String [read-only]
Returns the absolute path in slash-syntax notation of the movie clip instance on which this
movie clip was dropped. The
slash (
). To compare the
/
function to convert the returned value from slash syntax to a dot-syntax reference.
You must perform this conversion if you are using ActionScript 2.0, which does not
support slash syntax.
Availability: ActionScript 1.0; Flash Player 4
Example
The following example evaluates the
instance and uses
eval()
reference is then compared to the reference to the
garbage_mc
instance. If the two references are equivalent, the visibility of
they are not equivalent, the
origX = garbage_mc._x;
origY = garbage_mc._y;
garbage_mc.onPress = function() {
this.startDrag();
};
garbage_mc.onRelease = function() {
this.stopDrag();
if (eval(this._droptarget) == trashcan_mc) {
this._visible = false;
854
ActionScript classes
,
Math
property always returns a path that starts with a
_droptarget
property of an instance to a reference, use the
_droptarget
_droptarget
to convert it from slash syntax to a dot syntax reference. The
instance resets to its original position.
garbage
,
createEmptyMovieClip
,
endFill (MovieClip.endFill method)
,
lineTo (MovieClip.lineTo method)
property of the
garbage_mc
trashcan_mc
garbage_mc
,
,
eval()
movie clip
movie clip
is set to
. If
false
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?