Button
353
If you attempt to set the
blendMode
property to any other value, Flash Player sets it to
"normal"
.
Availability:
ActionScript 1.0; Flash Player 8
Example
In the following example you can see that if you set the property to an integer, Flash Player
converts the value to the corresponding string version:
my_button.blendMode = 8;
trace (my_button.blendMode) // add
For a related example, see the description of the
blendMode
property of the MovieClip class.
See also
blendMode (MovieClip.blendMode property)
cacheAsBitmap (Button.cacheAsBitmap property)
public cacheAsBitmap : Boolean
If set to
true
, Flash Player caches an internal bitmap representation of the button. This can
increase performance for buttons that contain complex vector content.
For a button that has
cacheAsBitmap
set to
true
, Flash Player stores a bitmap representation
for each of the four button states.
All vector data for a button that has a cached bitmap is drawn to the bitmap instead of the
main stage. The bitmap is then copied to the main stage as unstretched, unrotated pixels
snapped to the nearest pixel boundaries. Pixels are mapped one to one with the parent object.
If the bounds of the bitmap change, the bitmap is recreated instead of being stretched.
No internal bitmap is created unless the
cacheAsBitmap
property is set to
true
.
After you set a button's
cacheAsBitmap
property to
true
, the rendering does not change;
however, the button performs pixel snapping automatically. The animation speed can be
significantly faster depending on the complexity of the vector content.
The
cacheAsBitmap
property is automatically set to
true
whenever you apply a filter to a
button (when its
filter
array is not empty), and if a button has a filter applied to it,
cacheAsBitmap
is reported as
true
for that button, even if you set the property to
false
. If
you clear all filters for a button, the
cacheAsBitmap
setting changes to what it was last set to.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...