Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (33 sloc) 1.201 kb
78072d6 started readme
gka authored
1 vis4.as
2 =======
3
4 ### DelayedTask ###
5
6 If you want to run a function with a specific delay, you usally use the flash.events.Timer class. However, passing arguments to a delayed function requires some hacking that I encapsulated in DelayedTask.
7
8 Usage:
9
10 // dumb example, calculate Math.pow(3,5) after 2 seconds
11
12 new DelayedTask(
13 2000, // milliseconds
14 Math, // the context in which the function will be called
15 Math.pow, // the function
16 3, // first argument passed to the function
17 5, // second argument
18 );
19
20 You can pass as many arguments as you like.
21
22
23 ### Color ###
24
25 Color is a class that performs all kinds of color transformations.
26
27 Examples:
28
29 var color:uint;
30
31 // get integer color from HSL values
32 Color.fromHSL(120, .7, .3)._int;
33
34 // make a color half saturated
35 Color.fromInt(0xFF0000).saturation('*.5')._int;
36
37 // convert from HSV to HSL
38
39 var color:Color = Color.fromHSV(120, .5, .6);
40 color.mode = Color.HSL;
41 trace(color._hue, color._saturation, color._lightness);
42
43
44 ### ColorScale ###
45
46 Helps to interpolate between colors.
47
48 Examples:
49
50 var redGreen:ColorScale = new ColorScale([0xFF0000, 0x00FF00]);
51 redGreen.getIntColor(0.7);
52
53
54 ### Font & Label ###
55
56 to be continued..
Something went wrong with that request. Please try again.