MovieClip
933
Example
The following example sets the
trackAsMenu
property for three movie clips on the Stage.
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
(
concatenatedMatrix
,
concatenatedColorTransform
, and
pixelBounds
) are described in
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
tx
value of a movie clip's matrix, you must make a copy of the
entire matrix object, modify the
tx
property of the new object, and then copy the new object
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
tx
property. The following code has no effect on
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
myOldDisplayObj
to
myNewDisplayObj
:
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...