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

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

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

Example<br />

The following example creates a ColorTransform object called greenTransform:<br />

var greenTransform:flash.geom.ColorTransform = new<br />

flash.geom.ColorTransform(0.5, 1.0, 0.5, 0.5, 10, 10, 10, 0);<br />

The following example creates the ColorTransfrom object colorTrans_1 with the default<br />

constructor values. The fact that colorTrans_1 <strong>and</strong> colorTrans_2 trace the same values is<br />

evidence that the default constructor values are used.<br />

import flash.geom.ColorTransform;<br />

var colorTrans_1:ColorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0,<br />

0);<br />

trace(colorTrans_1);<br />

//(redMultiplier=1, greenMultiplier=1, blueMultiplier=1, alphaMultiplier=1,<br />

redOffset=0, greenOffset=0, blueOffset=0, alphaOffset=0)<br />

var colorTrans_2:ColorTransform = new ColorTransform();<br />

trace(colorTrans_2);<br />

//(redMultiplier=1, greenMultiplier=1, blueMultiplier=1, alphaMultiplier=1,<br />

redOffset=0, greenOffset=0, blueOffset=0, alphaOffset=0)<br />

concat (ColorTransform.concat method)<br />

public concat(second:ColorTransform) : Void<br />

Applies a second, additive color transformation to the movie clip. The second set of<br />

transformation parameters is applied to the colors of the movie clip after the first<br />

transformation has been completed.<br />

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

Parameters<br />

second:ColorTransform - A second ColorTransform object to be combined with the<br />

current ColorTransform object.<br />

Example<br />

The following example concatenates the ColorTransform object colorTrans_2 to<br />

colorTrans_1 resulting in a full red offset combined with a 0.5 alpha multiplier.<br />

import flash.geom.ColorTransform;<br />

import flash.geom.Transform;<br />

var colorTrans_1:ColorTransform = new ColorTransform(1, 1, 1, 1, 255, 0, 0,<br />

0);<br />

trace(colorTrans_1);<br />

442 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!