Hi,
I inrended to rewrite the code for Animating Mvie Clip.
This is my code :
[SIZE=2][FONT=courier new]package{
import flash.display.;
import flash.events.;
import flash.geom.;
import flash.text.;
public class Circles extends MovieClip{
var rad:Number=20;
var newCircle:MovieClip = new MovieClip();
public function Circles() {
stage.addEventListener(MouseEvent.CLICK, AddCircle);
}
public function AddCircle(evt:MouseEvent):void{
newCircle.graphics.beginFill(0xff0000);
newCircle.graphics.drawCircle(mouseX, mouseY, rad);
newCircle.graphics.endFill();
addChild(newCircle);
newCircle.addEventListener(Event.ENTER_FRAME, zoomCircle);
}
function zoomCircle(evt:Event):void {
var aCircle:MovieClip = MovieClip(evt.target);
aCircle.scaleX += 3;
aCircle.scaleY += 3;
}
}
}[/FONT][/SIZE]
Now, if I commented the aCircle.scaleX and aCircle.scaleY the code draws circles but, of course, does not change their zize. If a uncommented the above lines the code draws nothing.
What is my mistake ?
Thank you.