Movieclip.beginfill() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

MovieClip.beginFill()

Availability
Flash Player 6.
Usage
my_mc.beginFill([rgb:Number[, alpha:Number]]) : Void
Parameter
A hex color value (for example, red is 0xFF0000, blue is 0x0000FF, and so on). If this value
rgb
is not provided or is undefined, a fill is not created.
An integer between 0–100 that specifies the alpha value of the fill. If this value is not
alpha
provided, 100 (solid) is used. If the value is less than 0, Flash uses 0. If the value is greater than
100, Flash uses 100.
Returns
Nothing.
Description
Method; indicates the beginning of a new drawing path. If an open path exists (that is, if the
current drawing position does not equal the previous position specified in a
MovieClip.moveTo()
and then filled. This is similar to what happens when
You can extend the methods and event handlers of the MovieClip class by creating a subclass. For
more information, see "Assigning a class to a movie clip symbol" in Using ActionScript in Flash.
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.beginGradientFill(),
498
Chapter 2: ActionScript Language Reference
method) and it has a fill associated with it, that path is closed with a line
MovieClip.endFill()
MovieClip.endFill()
is called.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents