User Guide

MovieClip.endFill() 513
MovieClip.endFill()
Availability
Flash Player 6.
Usage
my_mc.endFill() : Void
Parameters
None.
Returns
Nothing.
Description
Method; applies a fill to the lines and curves added since the last call to beginFill() or
beginGradientFill(). Flash uses the fill that was specified in the previous call to beginFill()
or
beginGradientFill(). If the current drawing position does not equal the previous position
specified in a
moveTo() method and a fill is defined, the path is closed with a line and then filled.
Example
The following example creates a square with red fill on the Stage.
this.createEmptyMovieClip("square_mc", this.getNextHighestDepth());
square_mc.beginFill(0xFF0000);
square_mc.moveTo(10, 10);
square_mc.lineTo(100, 10);
square_mc.lineTo(100, 100);
square_mc.lineTo(10, 100);
square_mc.lineTo(10, 10);
square_mc.endFill();
An example is also in the drawingapi.fla file in the HelpExamples folder. The following list gives
typical paths to this folder:
Windows: \Program Files\Macromedia\Flash MX 2004\Samples\HelpExamples\
Macintosh: HD/Applications/Macromedia Flash MX 2004/Samples/HelpExamples/
See Also
MovieClip.beginFill(), MovieClip.beginGradientFill(), MovieClip.moveTo()