# Drawing API

**URL:** https://forum.kirupa.com/t/drawing-api/27264
**Category:** Uncategorized
**Created:** [July 31, 2003, 5:48pm UTC](https://forum.kirupa.com/t/drawing-api/27264 "2003-07-31T17:48:38Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![colin\_ferguson](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@colin\_ferguson](https://forum.kirupa.com/u/colin_ferguson)
#### Post date: [July 31, 2003, 5:48pm UTC](https://forum.kirupa.com/t/drawing-api/27264/1 "2003-07-31T17:48:38Z")

</div>

OK, this is alot to ask, but worth a try!!

I have an image of a map. I want my user to be able to draw a line on the map. I have seen the tutorial how to do this and it works great, but…

I need to restrict where the the user can draw (for example if the map was of the US, I only want them to be able to draw on Georgia. The rest of the map should not allow drawing.

In addition, when they stpo drawing and release the mouse, I need the movie to go to another frame in the movie.

To give some background, this is a simulation of a piece of software that allows users to draw on a particular US state and then when they relese the mouse it takes them to a new view of that US state (hence the need for the move to another frame.)

I know this is a long shot, but I also know some of you flash geniuses (geniusii??) could help me.

insert begging smiley!

colin

---

<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: [July 31, 2003, 5:56pm UTC](https://forum.kirupa.com/t/drawing-api/27264/2 "2003-07-31T17:56:20Z")

</div>

Just use hitTest with the drawing API. It should do what you need.

---

<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: [July 31, 2003, 5:58pm UTC](https://forum.kirupa.com/t/drawing-api/27264/3 "2003-07-31T17:58:37Z")

</div>

I will try looking up hit test.

Thanks for that.

Im beginning to think this might be out of my ability boundary!

---

<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: [July 31, 2003, 6:03pm UTC](https://forum.kirupa.com/t/drawing-api/27264/4 "2003-07-31T18:03:02Z")

</div>

Naw, especially if you got the Drawing API under control! I’m sure you can handle it.

---

<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: [July 31, 2003, 6:04pm UTC](https://forum.kirupa.com/t/drawing-api/27264/5 "2003-07-31T18:04:44Z")

</div>

Not really under control!!!

but it did draw!..thats a positive right!

I will give it a bash though…Scottish mentality…never admit defeat!

cheers again.

---

<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: [July 31, 2003, 6:06pm UTC](https://forum.kirupa.com/t/drawing-api/27264/6 "2003-07-31T18:06:13Z")

</div>

I agree with DigitalPimp - the API’s the harder of the two.

You know what else you could do’ you could make the state into a button and then apply your gotoAndPlay(“whatever”); on the button. The drawing API will draw right on top of the button. Would that work?

---

<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: [July 31, 2003, 6:07pm UTC](https://forum.kirupa.com/t/drawing-api/27264/7 "2003-07-31T18:07:14Z")

</div>

That would work Freddy or check clipEvent for mouse up. :p:

---

<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: [July 31, 2003, 6:07pm UTC](https://forum.kirupa.com/t/drawing-api/27264/8 "2003-07-31T18:07:43Z")

</div>

maybe.

you folks are quality!
