monokrom
-> colortrans.zip (16 Kb)

Colortrans is, simply put, an Actionscript class for time-based rather than frame-based (to the extent that this is possible in Flash, since the frequency with which the operations that retrieve the current time and act on this information are performed once per frame) "tweening" of the colors of movie clips that I put together as part of a larger project.

colortrans image (93 px X 100 px) colortrans image (93 px X 100 px) colortrans image (93 px X 100 px) colortrans image (93 px X 100 px)

-> view the movie (.swf, 7 Kb)

The above screenshots were taken of the demo Flash movie at intervals while it played. Below are the colorTransAddToQueue() method calls that add transitions to the queue followed by the colorTransStart() call that starts the clock on the instance of the colorTransitionsObj class.

    mctop.colorTransformer1.colorTransAddToQueue('_root.mctop', 5000, 20000 , [255,0,0], [226,0,0]);
    mctop.colorTransformer1.colorTransAddToQueue('_root.mctop', 27000, 30000 , [226,0,0], [245,0,0]);

    mctop.colorTransformer1.colorTransAddToQueue('_root.mcbott', 5000, 20000 , [255,0,0], [226,0,0]);
    mctop.colorTransformer1.colorTransAddToQueue('_root.mcbott', 29000, 30000 , [226,0,0], [245,0,0]);

    mctop.colorTransformer1.colorTransAddToQueue('_root.intopleft', 21000, 22000, [255,0,0], [205,0,0]);
    mctop.colorTransformer1.colorTransAddToQueue('_root.intopleft', 30000, 36000, [205,0,0], [235,0,0]);

    mctop.colorTransformer1.colorTransAddToQueue('_root.intopright', 21500, 22500, [255,0,0], [205,0,0]);
    mctop.colorTransformer1.colorTransAddToQueue('_root.intopright', 33500, 36000, [205,0,0], [235,0,0]);

    mctop.colorTransformer1.colorTransAddToQueue('_root.inbottleft', 22000, 23000, [255,0,0], [205,0,0]);
    mctop.colorTransformer1.colorTransAddToQueue('_root.inbottleft', 30000, 36000, [205,0,0], [235,0,0]);

    mctop.colorTransformer1.colorTransAddToQueue('_root.inbottright', 22500, 23500, [255,0,0], [205,0,0]);
    mctop.colorTransformer1.colorTransAddToQueue('_root.inbottright', 33500, 36000, [205,0,0], [235,0,0]);

    mctop.colorTransformer1.colorTransStart();
                
The colorTransAddToQueue method has 5 arguments. They are (in order) :
movie clip instance The path to the movie clip instance for which a color object will be created.
start time Number of milliseconds that elapse after the colorTransStart() call before the transition is begun.
finish time Number of milliseconds that elapse after the colorTransStart() call before the transition is begun.
initial rgb Array of RGB values. If the color of the movie clip instance's color object is not set to [initial rgb] already, then it will be set to [initial rgb].
finish rgb Array of RGB values. The color to which the movie clip instance's color object will be set incrementally during the interval beginning at [start time] and ending with [finish time].