03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

trace(myValue); // traces ff9933<br />

See also<br />

setRGB (Color.setRGB method)<br />

getTransform (Color.getTransform method)<br />

public getTransform() : Object<br />

Returns the transform value set by the last Color.setTransform() call.<br />

Returns<br />

Object - An object whose properties contain the current offset <strong>and</strong> percentage values for the<br />

specified color.<br />

Example<br />

The following example gets the transform object, <strong>and</strong> then sets new percentages for colors <strong>and</strong><br />

alpha of my_mc relative to their current values. To see this code work, place a multicolored<br />

movie clip on the Stage with the instance name my_mc. Then place the following code on<br />

Frame 1 in the main Timeline <strong>and</strong> select Control > Test Movie:<br />

var my_color:Color = new Color(my_mc);<br />

var myTransform:Object = my_color.getTransform();<br />

myTransform = { ra: 50, ba: 50, aa: 30};<br />

my_color.setTransform(myTransform);<br />

For descriptions of the parameters for a color transform object, see Color.setTransform().<br />

See also<br />

setTransform (Color.setTransform method)<br />

setRGB (Color.setRGB method)<br />

public setRGB(offset:Number) : Void<br />

Specifies an RGB color for a Color object. Calling this method overrides any previous<br />

Color.setTransform() settings.<br />

Parameters<br />

offset:Number - 0xRRGGBB The hexadecimal or RGB color to be set. RR, GG, <strong>and</strong> BB each<br />

consist of two hexadecimal digits that specify the offset of each color component. The 0x tells<br />

the ActionScript compiler that the number is a hexadecimal value.<br />

300 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!