# drawAPI question

**URL:** <https://forum.kirupa.com/t/drawapi-question/5394>\
**Category:** flash\
**Created:** [September 10, 2002, 1:29am UTC](https://forum.kirupa.com/t/drawapi-question/5394 "2002-09-10T01:29:55Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![girlcake](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@girlcake](https://forum.kirupa.com/u/girlcake)\
**Post date:** [September 10, 2002, 1:29am UTC](https://forum.kirupa.com/t/drawapi-question/5394/1 "2002-09-10T01:29:55Z")

</div>

I’m curious, can I have more than one line (different styles) laying over each other, controlled by one mouse event? I hope that’s clear…what i’m looking to do is add some depth to the line that is drawn by the user…this seems like it sould be the easiest if it is possible. I’ve tried duplicating the “line” object but whatever one is last in the script ends up on top by itself.

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:** [September 10, 2002, 1:51am UTC](https://forum.kirupa.com/t/drawapi-question/5394/2 "2002-09-10T01:51:10Z")

</div>

Sounds simple. You mean like 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:** [September 10, 2002, 1:54am UTC](https://forum.kirupa.com/t/drawapi-question/5394/3 "2002-09-10T01:54:29Z")

</div>

You might also want to look into [COLOR=blue]lineStyle()[/COLOR].

---

<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:** [September 10, 2002, 2:00am UTC](https://forum.kirupa.com/t/drawapi-question/5394/4 "2002-09-10T02:00:45Z")

</div>

thanks  
Are there parameters of [COLOR=blue]LineStyle()[/COLOR] other than thickness, color & alpha? See the problem is I need to see the lines below the line on top, with different colors, alphas.

---

<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:** [September 10, 2002, 2:38am UTC](https://forum.kirupa.com/t/drawapi-question/5394/5 "2002-09-10T02:38:51Z")

</div>

The [COLOR=blue]lineStyle()[/COLOR] looks flexible - although I must admit I haven’t had to use it. If you read about it’s uses in the reference - SHIFT+F1, then go to index and lookup [COLOR=blue]lineStyle()[/COLOR] - you might find something that will help. If not, post 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:** [September 10, 2002, 9:25am UTC](https://forum.kirupa.com/t/drawapi-question/5394/6 "2002-09-10T09:25:17Z")

</div>

You can create a clip for each line and then stack them with swapDepths.

You can also check the AS tricks section, maybe you’ll find something interesting…

pom :asian:

---

<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:** [September 10, 2002, 7:45pm UTC](https://forum.kirupa.com/t/drawapi-question/5394/7 "2002-09-10T19:45:54Z")

</div>

I’ve never used swapdepths…is there anything special i should know about it?

thanks a whole lot…i think i’m moving in the right direction.

---

<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:** [September 11, 2002, 6:28am UTC](https://forum.kirupa.com/t/drawapi-question/5394/8 "2002-09-11T06:28:17Z")

</div>

You can find a tutorial [here](http://www.kirupa.com/developer/actionscript/swapdepth.asp) but there are a couple of mistakes. Basically, this x=0 and then x=x+2 are wrong. Just stack at the depth you want, high stack is on top, low stack at the bottom. You can also put negative depths.

pom :asian:

---

<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:** [September 12, 2002, 8:53pm UTC](https://forum.kirupa.com/t/drawapi-question/5394/9 "2002-09-12T20:53:24Z")

</div>

Does The swap Depth tutorial work in Flash 5. I want to use it and I was just wondering before I start a whole bunch of work and can’t finish becasue I use 5.

---

<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:** [September 13, 2002, 12:06am UTC](https://forum.kirupa.com/t/drawapi-question/5394/10 "2002-09-13T00:06:20Z")

</div>

lineStyle just sets the style of the line…i have a thing here that generates a random line style… 🙂

---

<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:** [September 13, 2002, 9:30am UTC](https://forum.kirupa.com/t/drawapi-question/5394/11 "2002-09-13T09:30:42Z")

</div>

> \*Originally posted by sintax321 \*  
> \*\*Does The swap Depth tutorial work in Flash 5. I want to use it and I was just wondering before I start a whole bunch of work and can’t finish becasue I use 5. \*\*  
> You’re using Flash 5?!?!?! In that case you can forget the drawing API, syntax. But yes, swapDepths works with Flash 5 (it is written in the AS dictionary by the way, under availability).

pom

---

<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:** [September 13, 2002, 10:51am UTC](https://forum.kirupa.com/t/drawapi-question/5394/12 "2002-09-13T10:51:52Z")

</div>

has it always made things like lineStyle() blue? cause that works well…hehe

---

<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:** [September 13, 2002, 10:53am UTC](https://forum.kirupa.com/t/drawapi-question/5394/13 "2002-09-13T10:53:15Z")

</div>

hrmm gues not… [COLOR=blue]lineStyle()[/COLOR]  
heh thats better…
