I was wondering, can the code of this tutorial be written in a class?
I was thinking about this ActionScript Code:
ActionScript Code:
[LEFT][LEFT][FONT=Courier New][COLOR=#000000]package
{ import flash.display.MovieClip;
import flash.events.*;
public class BlueCircle extends MovieClip {
public function BlueCircle() {
for (var i:int= 0; i < 200; i++) { [/COLOR][/FONT]
[FONT=Courier New][COLOR=#000000] private var newCircle:BlueCircle = new BlueCircle();
private var randomValue:Number = Math.random()*1; [/COLOR][/FONT]
[FONT=Courier New][COLOR=#000000]
newCircle.x = -100+Math.random()*500;
newCircle.y = -100+Math.random()*400;
newCircle.scaleX = newCircle.scaleY = randomValue;
newCircle.alpha = 1-randomValue;
this.addChild(newCircle);
BlueCircle();
}
}
}}[/COLOR][/FONT][/LEFT]
[/LEFT]
Be gentle with me I am a newbie!!