03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

trackAsMenu (MovieClip.trackAsMenu property)<br />

public trackAsMenu : Boolean<br />

A Boolean value that indicates whether other buttons or movie clips can receive mouse release<br />

events. The trackAsMenu property lets you create menus. You can set the trackAsMenu<br />

property on any button or movie clip object. If the trackAsMenu property does not exist, the<br />

default behavior is false.<br />

You can change the trackAsMenu property at any time; the modified movie clip immediately<br />

uses the new behavior.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following example sets the trackAsMenu property for three movie clips on the Stage.<br />

Click a movie clip <strong>and</strong> release the mouse button on a second movie clip to see which instance<br />

receives the event.<br />

myMC1_mc.trackAsMenu = true;<br />

myMC2_mc.trackAsMenu = true;<br />

myMC3_mc.trackAsMenu = false;<br />

myMC1_mc.onRelease = clickMC;<br />

myMC2_mc.onRelease = clickMC;<br />

myMC3_mc.onRelease = clickMC;<br />

function clickMC() {<br />

trace("you clicked the "+this._name+" movie clip.");<br />

};<br />

See also<br />

trackAsMenu (Button.trackAsMenu property)<br />

transform (MovieClip.transform property)<br />

public transform : Transform<br />

An object with properties pertaining to a movie clip's matrix, color transform, <strong>and</strong> pixel<br />

bounds. The specific properties matrix, colorTransform, <strong>and</strong> three read-only properties<br />

(concatenatedMatrix, concatenatedColorTransform, <strong>and</strong> pixelBounds) are described in<br />

the entry for the Transform class.<br />

Each of the transform object's properties is itself an object. This is important because the only<br />

way to set new values for the matrix or colorTransform objects is to create an object <strong>and</strong> copy<br />

that object into the transform.matrix or transform.colorTransform property.<br />

MovieClip 943

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!