# Drawing API / how do you do that?

**URL:** https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/119946
**Category:** Uncategorized
**Created:** [August 19, 2004, 12:12pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/119946 "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/119946/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: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [August 19, 2004, 12:53pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/119946/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: ![matiouz](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@matiouz](https://forum.kirupa.com/u/matiouz)
#### Post date: [August 19, 2004, 1:31pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/119946/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: ![Jerryscript](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jerryscript/32/451_2.png) [@Jerryscript](https://forum.kirupa.com/u/Jerryscript)
#### Post date: [August 20, 2004, 3:13pm UTC](https://forum.kirupa.com/t/drawing-api-how-do-you-do-that/119946/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)
