# Things drawing themselves

**URL:** <https://forum.kirupa.com/t/things-drawing-themselves/33970>\
**Category:** flash\
**Created:** [October 26, 2003, 6:24am UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970 "2003-10-26T06:24:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spirit\_Z3RO](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Spirit\_Z3RO](https://forum.kirupa.com/u/Spirit_Z3RO)\
**Post date:** [October 26, 2003, 6:24am UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/1 "2003-10-26T06:24:13Z")

</div>

How do I have a shape draw itself out? Something like a circle or a square and such.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 8:04am UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/2 "2003-10-26T08:04:28Z")

</div>

You mean random?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 10:08am UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/3 "2003-10-26T10:08:02Z")

</div>

drawing API

thats about all i know on the subject

you can find some source fla’s on [http://flashtothecore.praystation.com](http://flashtothecore.praystation.com)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 12:40pm UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/4 "2003-10-26T12:40:30Z")

</div>

Here’s a prototype you can use to create self-drawing circles:

```auto

MovieClip.prototype.drawCircle = function(x,y,radius){
	var angle = Math.PI+Math.PI/2;
	this.lineStyle(1,0x000000,100);
	this.moveTo(x+Math.cos(angle)*radius,y+Math.sin(angle)*radius);
	this.onEnterFrame = function(){
		angle+=0.1
		angle >= 3.5*Math.PI ? delete this.onEnterFrame : null;
		this.lineTo(x+Math.cos(angle)*radius,y+Math.sin(angle)*radius);
	}
}
// Example usage:
this.createEmptyMovieClip("circle",1).drawCircle(350,250,100)

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 1:39pm UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/5 "2003-10-26T13:39:10Z")

</div>

or you could go the non actionscipt way and create the self drawing shape animation by using shape tweens and frame by frame animation.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 1:45pm UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/6 "2003-10-26T13:45:48Z")

</div>

Theres also this:

[http://proto.layer51.com/d.aspx?f=952](http://proto.layer51.com/d.aspx?f=952)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 12:37am UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/7 "2003-10-27T00:37:25Z")

</div>

T\_T didnt think it was this complicated. Thank you all for replying, I’ll work on this

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 27, 2003, 12:49am UTC](https://forum.kirupa.com/t/things-drawing-themselves/33970/8 "2003-10-27T00:49:08Z")

</div>

well waht exactly do you mean you have an example because sometimes its just masks just to make sure you are getting the correct answers to what you were asking if you have an example please show us
