# Drawing API / how do you do that?

**URL:** https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/61532
**Category:** Uncategorized
**Created:** [August 19, 2004, 12:12pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/61532 "2004-08-19T12:12:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![matiouz](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@matiouz](https://forum.kirupa.com/u/matiouz)
#### Post date: [August 19, 2004, 12:12pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/61532/1 "2004-08-19T12:12:55Z")

</div>

Hi Guys, I’m seraching a code that allows me to do something like that :  
[jesaispasdessiner](http://www.jesaispasdessiner.com)  
There’s a filed where you can draw and save your drawing.

to Draw, here is the code I want to use :

```auto

_root.createEmptyMovieClip("lestylo",1);

_root.onMouseDown = function(){
	lestylo.moveTo(_xmouse,_ymouse);

	lestylo.lineStyle(2,0x00CCFF,100);
	this.onEnterFrame = function(){
		lestylo.lineTo(_xmouse,_ymouse);
	}
}

_root.onMouseUp = function(){
	this.onEnterFrame = null;
}

```

Now I’d like to :

- either save the mouse’ movement, redrawing the picture
- or only save the final image

Could someone give me a source for that ?  
Do you know how to do this ?

thanks !!! C:-)

---

<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: [August 19, 2004, 12:53pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/61532/2 "2004-08-19T12:53:07Z")

</div>

[http://www.senocular.com/news.php?subaction=showcomments&id=1091558049](http://www.senocular.com/news.php?subaction=showcomments&id=1091558049)

---

<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: [August 19, 2004, 1:31pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/61532/3 "2004-08-19T13:31:50Z")

</div>

thanks alot,  
I already found this by searching in the forums…  
I’ll have a look at this this evening, it looks great…

I just have to learn PHP, now !

thanks

---

<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: [August 20, 2004, 3:13pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/61532/4 "2004-08-20T15:13:03Z")

</div>

Since you plan to learn PHP, be sure to check out the Ming module, it will allow you to save the image to a new SWF movie. Here’s an example (with source), and there is also a link to a drawing pad that stores mutliple images in the user’s SharedObject rather than on the server.

[http://jerryscript.hostrocket.com/flash/draw/SWFDrawing2JPEG.html](http://jerryscript.hostrocket.com/flash/draw/SWFDrawing2JPEG.html)
