Example
The following example sets the
property for three movie clips on the Stage.
trackAsMenu
Click a movie clip and release the mouse button on a second movie clip to see which instance
receives the event.
myMC1_mc.trackAsMenu = true;
myMC2_mc.trackAsMenu = true;
myMC3_mc.trackAsMenu = false;
myMC1_mc.onRelease = clickMC;
myMC2_mc.onRelease = clickMC;
myMC3_mc.onRelease = clickMC;
function clickMC() {
trace("you clicked the "+this._name+" movie clip.");
};
See also
trackAsMenu (Button.trackAsMenu property)
transform (MovieClip.transform property)
public transform : Transform
An object with properties pertaining to a movie clip's matrix, color transform, and pixel
bounds. The specific properties matrix, colorTransform, and three read-only properties
(
,
, and
) are described in
concatenatedMatrix
concatenatedColorTransform
pixelBounds
the entry for the Transform class.
Each of the transform object's properties is itself an object. This is important because the only
way to set new values for the matrix or colorTransform objects is to create an object and copy
that object into the transform.matrix or transform.colorTransform property.
For example, to increase the
value of a movie clip's matrix, you must make a copy of the
tx
entire matrix object, modify the
property of the new object, and then copy the new object
tx
into the matrix property of the transform object:
var myMatrix:Object = myDisplayObject.transform.matrix;
myMatrix.tx += 10;
myDisplayObject.transform.matrix = myMatrix;
You cannot directly set the
property. The following code has no effect on
tx
:
myDisplayObject
myDisplayObject.transform.matrix.tx += 10;
You can also copy an entire transform object and assign it to another movie clip's transform
property. For example, the following code copies the entire transform object from
to
:
myOldDisplayObj
myNewDisplayObj
MovieClip
933
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?