Ted Patrick > { Events & Community } > Adobe Systems


MovieClip.prototype._color

I have found this extremely useful on a current project. This library adds a getter/setter to the MovieClip class allowing you to manage color without declaring a Color Object. A Color object is created within getter/setter execution but is destroyed as a temporary variable. This keeps you from having to manage color objects along with the MovieClips they modify.

Include into a project:
#include "_color.as"

Download ZIP

Here is the syntax for its use:

MyMC._color = "0xFF0000:30" //Turn the clip red with 30% alpha

MyMC._color = "0x00FF00" //Turn the clip green

MyMC._color = 0 //Turn the clip black > Numbers are interpreted as RGB Values directly

MyMC._color = 0x000000 //Turn the clip black

MyMC._color = 0xFFFFFF //Turn the clip white

MyMC._color = "" //Turn the clip to its original color

MyMC._color = undefined //Turn the clip to its original color

Credits to Jon Williams at ShoveMedia for some of the color manipulation code from the IOLib codebase.

Enjoy!

Ted ;)

1 Responses to “ MovieClip.prototype._color ”

  1. # Anonymous Anonymous

    Itīs cool tool... thanks.  

Post a Comment



Jobs


Flex Jobs
city, state, zip


© 2008 Ted On Flash