324
ActionScript classes
Example
This example creates a new Color object for a target SWF file, creates a generic object called
myColorTransform
with the properties defined above, and uses the
setTransform()
method
to pass the
colorTransformObject
to a Color object. To use this code in a Flash (FLA)
document, place it on Frame 1 on the main Timeline and place a movie clip on the Stage with
the instance name
my_mc
, as in the following code:
// Create a color object called
my_color
for the target
my_mc
var my_color:Color = new Color(my_mc);
// Create a color transform object called
myColorTransform
using
// Set the values for
myColorTransform
var myColorTransform:Object = { ra: 50, rb: 244, ga: 40, gb: 112, ba: 12,
bb: 90, aa: 40, ab: 70};
// Associate the color transform object with the Color object
// created for
my_mc
my_color.setTransform(myColorTransform);
See also
Object
Date
Object
|
+-Date
public class
Date
extends
Object
The Date class lets you retrieve date and time values relative to universal time (Greenwich
mean time, now called universal time or UTC) or relative to the operating system on which
Flash Player is running. The methods of the Date class are not static but apply only to the
individual Date object specified when the method is called. The
Date.UTC()
method is an
exception; it is a static method.
The Date class handles daylight saving time differently, depending on the operating system
and Flash Player version. Flash Player 6 and later versions handle daylight saving time on the
following operating systems in these ways:
■
Windows - the Date object automatically adjusts its output for daylight saving time. The
Date object detects whether daylight saving time is employed in the current locale, and if
so, it detects the standard-to-daylight saving time transition date and times. However, the
transition dates currently in effect are applied to dates in the past and the future, so the
daylight saving time bias might calculate incorrectly for dates in the past when the locale
had different transition dates.
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...