1268 ActionScript classes
var parentTrans:Transform = new Transform(parentRect);
var childTrans:Transform = new Transform(childRect);
var blueColorTransform:ColorTransform = new ColorTransform(0, 1, 1, 1, 0,
0, 255, 0);
parentTrans.colorTransform = blueColorTransform;
trace(childTrans.concatenatedColorTransform);
// (redMultiplier=0, greenMultiplier=1, blueMultiplier=1,
alphaMultiplier=1, redOffset=0, greenOffset=0, blueOffset=255,
alphaOffset=0)
trace(childTrans.colorTransform);
// (redMultiplier=1, greenMultiplier=1, blueMultiplier=1,
alphaMultiplier=1, redOffset=0, greenOffset=0, blueOffset=0,
alphaOffset=0)
trace(parentTrans.concatenatedColorTransform);
// (redMultiplier=0, greenMultiplier=1, blueMultiplier=1,
alphaMultiplier=1, redOffset=0, greenOffset=0, blueOffset=255,
alphaOffset=0)
function createRectangle(width:Number, height:Number, color:Number,
scope:MovieClip):MovieClip {
scope = (scope == undefined) ? this : scope;
var depth:Number = scope.getNextHighestDepth();
var mc:MovieClip = scope.createEmptyMovieClip("mc_" + depth, depth);
mc.beginFill(color);
mc.lineTo(0, height);
mc.lineTo(width, height);
mc.lineTo(width, 0);
mc.lineTo(0, 0);
return mc;
}
See also
ColorTransform (flash.geom.ColorTransform)
concatenatedMatrix (Transform.concatenatedMatrix
property)
public concatenatedMatrix : Matrix [read-only]
A Matrix object representing the combined transformation matrixes of this object and all of
its parent objects, back to the root level. If different transformation matrixes have been
applied at different levels, each of those matrixes will be concatenated into one matrix for this
property.
Availability:
ActionScript 1.0; Flash Player 8
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...