MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 422

Actionscript 2.0 language reference
Table of Contents

Advertisement

is the offset for the green component (-255 to 255).
gb
is the percentage for the blue component (-100 to 100).
ba
is the offset for the blue component (-255 to 255).
bb
is the percentage for alpha (-100 to 100).
aa
is the offset for alpha (-255 to 255).
ab
You create a
colorTransformObject
var myColorTransform:Object = new Object();
myColorTransform.ra = 50;
myColorTransform.rb = 244;
myColorTransform.ga = 40;
myColorTransform.gb = 112;
myColorTransform.ba = 12;
myColorTransform.bb = 90;
myColorTransform.aa = 40;
myColorTransform.ab = 70;
You can also use the following syntax to create a
var myColorTransform:Object = { ra: 50, rb: 244, ga: 40, gb: 112, ba: 12,
bb: 90, aa: 40, ab: 70}
Availability: ActionScript 1.0; Flash Player 5
Parameters
transformObject:Object
instance of the Object class must have the following properties that specify color transform
values:
,
,
,
ra
rb
ga
gb
Example
This example creates a new Color object for a target SWF file, creates a generic object called
with the properties defined above, and uses the
myColorTransform
to pass the
colorTransformObject
document, place it on Frame 1 on the main Timeline and place a movie clip on the Stage with
the instance name
my_mc
// Create a color object called my_color for the target my_mc
var my_color:Color = new Color(my_mc);
// Create a color transform object called myColorTransform using
// Set the values for myColorTransform
var myColorTransform:Object = { ra: 50, rb: 244, ga: 40, gb: 112, ba: 12,
bb: 90, aa: 40, ab: 70};
// Associate the color transform object with the Color object
// created for my_mc
my_color.setTransform(myColorTransform);
422
ActionScript classes
parameter as follows:
- An object created with the
,
,
,
,
. These properties are explained below.
ba
bb
aa
ab
to a Color object. To use this code in a Flash (FLA)
, as in the following code:
colorTransformObject
new Object
setTransform()
parameter:
constructor. This
method

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF