03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

getTransform (Color.getTransform method)<br />

public getTransform() : Object<br />

Deprecated since Flash Player 8. The Color class has been deprecated in favor of the<br />

flash.geom.ColorTransform class.<br />

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

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<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 />

Deprecated since Flash Player 8. The Color class has been deprecated in favor of the<br />

flash.geom.ColorTransform class.<br />

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

Color.setTransform() settings.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<br />

Color 427

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

Saved successfully!

Ooh no, something went wrong!