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.

}<br />

colors = [0xFF0000, 0x0000FF];<br />

fillType = "radial"<br />

alphas = [100, 100];<br />

ratios = [0, 0xFF];<br />

matrix = {matrixType:"box", x:100, y:100, w:200, h:200,<br />

r:(45/180)*Math.PI};<br />

beginGradientFill(fillType, colors, alphas, ratios, matrix);<br />

moveTo(100, 100);<br />

lineTo(100, 300);<br />

lineTo(300, 300);<br />

lineTo(300, 100);<br />

lineTo(100, 100);<br />

endFill();<br />

This code draws the following image on the screen:<br />

See also<br />

beginFill (MovieClip.beginFill method), endFill (MovieClip.endFill method),<br />

lineStyle (MovieClip.lineStyle method), lineTo (MovieClip.lineTo method),<br />

moveTo (MovieClip.moveTo method)<br />

clear (MovieClip.clear method)<br />

public clear() : Void<br />

Removes all the graphics created during runtime by using the movie clip draw methods,<br />

including line styles specified with MovieClip.lineStyle(). Shapes <strong>and</strong> lines that are<br />

manually drawn during authoring time (with the Flash drawing tools) are unaffected.<br />

Example<br />

The following example draws a box on the Stage. When the user clicks the box graphic, it<br />

removes the graphic from the Stage.<br />

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

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

MovieClip 413

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

Saved successfully!

Ooh no, something went wrong!