Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 QuickSkills
Randomly Attaching Multiple Instances III (color)  


Download .fla

How to create this.


Actionscript

var numBalls:Number = 30;

for(i=0;i<numBalls;i++){
var ball = this.attachMovie("ball","ball" +i,i);
ball._x = Math.random()*Stage.width;
ball._y = Math.random()*Stage.height;

var rand_color = new Color("ball");
rand_color.setRGB(Math.round(Math.random()*
0xFFFFFF));
}



b.randy = Math.round(Math.random()*Stage.height);

b.onEnterFrame =

© 2008 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us