# How to animate what you draw on the stage with Actionscript 3.0

**URL:** https://forum.kirupa.com/t/how-to-animate-what-you-draw-on-the-stage-with-actionscript-3-0/305950
**Category:** flash
**Created:** [March 6, 2010, 3:29am UTC](https://forum.kirupa.com/t/how-to-animate-what-you-draw-on-the-stage-with-actionscript-3-0/305950 "2010-03-06T03:29:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fs\_tigre](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://forum.kirupa.com/u/fs_tigre)
#### Post date: [March 6, 2010, 3:29am UTC](https://forum.kirupa.com/t/how-to-animate-what-you-draw-on-the-stage-with-actionscript-3-0/305950/1 "2010-03-06T03:29:02Z")

</div>

Hi,

I have been practicing on how to draw shapes on the stage with actionscript and it seems fun.

```auto
var rec:Sprite = new Sprite();
with (rec.graphics) {

	beginFill(0xff23564,1);
	lineStyle(0);	
	drawCircle(20,20,50);
	moveTo(100, 100);
	lineTo(100,0);
	lineTo(200, 0);
	lineTo(200, 100);
	lineTo(100, 100);
	endFill();
	
}

addChild(rec);

```

But now I was wondering how hard would it be to animate what you draw for instance how would you animate a simple line?

```auto
var rec:Sprite = new Sprite();
with (rec.graphics) {
	lineStyle(0);	
	moveTo(100, 100);
	lineTo(100,0);
	endFill();	
}

addChild(rec);

```

Thanks
