-
Notifications
You must be signed in to change notification settings - Fork 0
/
ColorfulCircle.as
executable file
·49 lines (40 loc) · 1.05 KB
/
ColorfulCircle.as
1
package { import flash.display.*; import flash.events.*; import flash.geom.ColorTransform; public class ColorfulCircle extends MovieClip { var speed:Number = 0; var colorNumber:Number = Math.random() * 1; public function ColorfulCircle() { //speed = .1 //speed += .5 this.addEventListener(Event.ENTER_FRAME, FadeCircleOut); var colorTransformer:ColorTransform = this.transform.colorTransform; colorTransformer.greenMultiplier = colorNumber; colorTransformer.blueMultiplier = colorNumber; colorTransformer.redMultiplier = colorNumber; transform.colorTransform = colorTransformer; } private function FadeCircleOut(e:Event) { if (currentFrame == 10) { this.removeEventListener(Event.ENTER_FRAME, FadeCircleOut) parent.removeChild(this); } this.y -= speed; //alpha -= .1; //this.scaleX += 2 * speed; //this.scaleY += 2 * speed; //this.rotation += 20; /*if (this.x < -100) { this.removeEventListener(Event.ENTER_FRAME, FadeCircleOut); parent.removeChild(this); }*/ } }}