Hey geeks,
Today, I am in a good mood. So I decided to share a class which generates an given ammount of shapes and animates them.
All you need to do is download the files, and create an instance of the class. This class creates random shapes with random ammounts.
Note:For the animation part of this class I used Timelinelite from the great developers of Greensock. The files needed to utilize these tweening library are included in the rar file.
/*
Parameters:
src:MovieClip = the parent movieclip
maxAmmount:int = max ammount of shapes
maxDuration = maximum duration for the animation
maxWidth:int = maximum width of the created shapes
bgColor:uint = backgroundcolor for the shapes
shapeType:String = defines the shape who should be drawn.
Possible values: "rectangle","circle",triangle","elipse"
*/
var animatedmask:AnimatedShapesLoop =
new AnimatedShapesLoop(this,10,3,500,0xFFFFFF,"rectangle");
addChild(animatedmask);
Parameters:
src:MovieClip = the parent movieclip
maxAmmount:int = max ammount of shapes
maxDuration = maximum duration for the animation
maxWidth:int = maximum width of the created shapes
bgColor:uint = backgroundcolor for the shapes
shapeType:String = defines the shape who should be drawn.
Possible values: "rectangle","circle",triangle","elipse"
*/
var animatedmask:AnimatedShapesLoop =
new AnimatedShapesLoop(this,10,3,500,0xFFFFFF,"rectangle");
addChild(animatedmask);
Sample fla file included in the download
Their are alot of ways where you can use and implement this class. Have fun and keep coding!
Lode
var animatedmask:AnimatedShapesLoop = new AnimatedShapesLoop(this,10,500,0xFFFFFF,”rectangle”);
Also interesting reads: