EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 1267

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Transform (flash.geom.Transform) 1267
// (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)
concatenatedColorTransform
(Transform.concatenatedColorTransform property)
public concatenatedColorTransform : ColorTransform [read-only]
A ColorTransform object representing the combined color transformations applied to this
object and all of its parent objects, back to the root level. If different color transformations
have been applied at different levels, each of those transformations will be concatenated into
one ColorTransform object for this property.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example applies two Transform objects to both a parent and child MovieClip
object. A
blueColorTransform variable is then applied to the Transform object
parentTrans, which adjusts the color of both parent and child MovieClip objects toward
blue. You can see how
child.concatenatedColorTransform is the combination of
parentTrans and childTrans.
import flash.geom.Transform;
import flash.geom.ColorTransform;
var parentRect:MovieClip = createRectangle(20, 80, 0xFF0000);
var childRect:MovieClip = createRectangle(10, 40, 0x00FF00, parentRect);

Table of Contents

Related product manuals