
Date() Global Function
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
501
// Assign the required properties of boxTransform (ra, rb, etc.), setting our
// transformation values as desired
boxTransform.ra = 50; // Red percentage
boxTransform.rb = 0; // Red offset
boxTransform.ga = 100; // Green percentage
boxTransform.gb = 25; // Green offset
boxTransform.ba = 100; // Blue percentage
boxTransform.bb = 0; // Blue offset
boxTransform.aa = 40; // Alpha percentage
boxTransform.ab = 0; // Alpha offset
// Now that our transform object has been prepared, pass it to setTransform()
boxColor.setTransform(boxTransform);
This approach to creating a transform object is fairly labor-intensive. We can generate a
new transform object more easily using the getTransform() method, as follows:
// Create a new Color object for the box clip
boxColor = new Color("box");
// Invoke getTransform() on boxColor, which retrieves a transform object
boxTransform = boxColor.getTransform();
// Now alter boxTransform's properties as needed, leaving others unchanged
boxTransform.rb = 51; // Red offset
boxTransform.aa = 40; // Alpha percentage
// Use our transform object with setTransform()
boxColor.setTransform(boxTransform);
See Also
Color.getTransform()
Date() Global Function
a string representing the current date and time
Flash 5
Date()
Returns ...