User Guide
826 ActionScript classes
Methods inherited from class Object
_alpha (MovieClip._alpha property)
public _alpha : Number
The alpha transparency value of the movie clip. Valid values are 0 (fully transparent) to 100
(fully opaque). The default value is 100. Objects in a movie clip with
_alpha set to 0 are
active, even though they are invisible. For example, you can still click a button in a movie clip
whose
_alpha property is set to 0. To disable the button completely, you can set the movie
clip's
_visible property to false.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Player 4
Example
The following code sets the
_alpha property of a dynamically created movie clip named
triangle to 50% when the mouse rolls over the movie clip. Add the following ActionScript
to your FLA or AS file:
this.createEmptyMovieClip("triangle", this.getNextHighestDepth());
triangle.beginFill(0x0000FF, 100);
triangle.moveTo(10, 10);
triangle.lineTo(10, 100);
triangle.lineTo(100, 10);
triangle.lineTo(10, 10);
triangle.onRollOver = function() {
this._alpha = 50;
};
triangle.onRollOut = function() {
this._alpha = 100;
};
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
addProperty (Object.addProperty method), hasOwnProperty
(Object.hasOwnProperty method), isPropertyEnumerable
(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf
method), registerClass (Object.registerClass method), toString
(Object.toString method), unwatch (Object.unwatch method), valueOf
(Object.valueOf method), watch (Object.watch method)