03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - 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.

A Boolean value that indicates whether a movie clip is enabled. The default value of enabled<br />

is true. If enabled is set to false, the movie clip's callback methods <strong>and</strong> onaction event<br />

h<strong>and</strong>lers are no longer invoked, <strong>and</strong> the Over, Down, <strong>and</strong> Up frames are disabled. The<br />

enabled property does not affect the Timeline of the movie clip; if a movie clip is playing, it<br />

continues to play. The movie clip continues to receive movie clip events (for example,<br />

mouseDown, mouseUp, keyDown, <strong>and</strong> keyUp).<br />

The enabled property only governs the button-like properties of a movie clip. You can<br />

change the enabled property at any time; the modified movie clip is immediately enabled or<br />

disabled. The enabled property can be read out of a prototype object. If enabled is set to<br />

false, the object is not included in automatic tab ordering.<br />

Example<br />

The following example disables the circle_mc movie clip when the user clicks it:<br />

circle_mc.onRelease = function() {<br />

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

this.enabled = false;<br />

};<br />

endFill (MovieClip.endFill method)<br />

public endFill() : Void<br />

Applies a fill to the lines <strong>and</strong> curves added since the last call to beginFill() or<br />

beginGradientFill(). Flash uses the fill that was specified in the previous call to<br />

beginFill() or beginGradientFill(). If the current drawing position does not equal the<br />

previous position specified in a moveTo() method <strong>and</strong> a fill is defined, the path is closed with<br />

a line <strong>and</strong> then filled.<br />

Example<br />

The following example creates a square with red fill on the Stage:<br />

this.createEmptyMovieClip("square_mc", this.getNextHighestDepth());<br />

square_mc.beginFill(0xFF0000);<br />

square_mc.moveTo(10, 10);<br />

square_mc.lineTo(100, 10);<br />

square_mc.lineTo(100, 100);<br />

square_mc.lineTo(10, 100);<br />

square_mc.lineTo(10, 10);<br />

square_mc.endFill();<br />

An example is also in the drawingapi.fla file in the ActionScript samples folder at<br />

www.adobe.com/go/learn_fl_samples. Download <strong>and</strong> decompress the .zip file <strong>and</strong> navigate to<br />

the folder for your version of ActionScript to access the sample.<br />

422 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!