PDA

View Full Version : drawAPI question



girlcake
September 9th, 2002, 09:29 PM
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

flex
September 9th, 2002, 09:51 PM
Sounds simple. You mean like this

flex
September 9th, 2002, 09:54 PM
You might also want to look into lineStyle().

girlcake
September 9th, 2002, 10:00 PM
thanks
Are there parameters of LineStyle() other than thickness, color & alpha? See the problem is I need to see the lines below the line on top, with different colors, alphas.

flex
September 9th, 2002, 10:38 PM
The lineStyle() 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 lineStyle() - you might find something that will help. If not, post again.

pom
September 10th, 2002, 05:25 AM
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:

girlcake
September 10th, 2002, 03:45 PM
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.

pom
September 11th, 2002, 02:28 AM
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:

sintax321
September 12th, 2002, 04:53 PM
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.

Bezzer
September 12th, 2002, 08:06 PM
lineStyle just sets the style of the line...i have a thing here that generates a random line style... :)

pom
September 13th, 2002, 05:30 AM
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

Bezzer
September 13th, 2002, 06:51 AM
has it always made things like lineStyle() blue? cause that works well..hehe

Bezzer
September 13th, 2002, 06:53 AM
hrmm gues not... lineStyle()
heh thats better...