Advanced drawing tool

Does anyone know how to simulate a drawing tool like this?
[list]
[]Arrow tool: does not produce any drawing. It desativate the use of the last drawing tool selected
[
]Line tool: it draws lines ________
[]Free tool: freehand way to draw
[
]Erase tool: when it is clicked, erases all the drawing
[*]Color selection: when the line and free tools are selected, it displays 4 diferent color boxes for the user to choose (red, yellow, white and black).
[/list]

Correct if I`m wrong. I would have to create diferent function and when a tool is selected, it calls that specific function! If this is right, does anyone have a tip or have seen some tutorial like this?

Thanks
:thumb:

I sure hope you know the drawing API well otherwise this is too advanced for you.

Just as an example of what you are in for here an an example of the line tool one…

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=16658

If you don’t know the drawing API… start reading :wink:

http://www.kirupa.com/developer/actionscript/tricks/drawing_api.asp

Sorry about the repeated question on the other thread!
Thanks
:thumb:

http://www.kirupa.com/developer/actionscript/drawingboard.htm

Theres an example of freehand drawing

And example of erasing would be the same as the freehand drawing, but the color of the line should be the same color as your background (i highly recommend a solid color background for your drawing surface).

Color selection would be using variables to store what color it should be and using that in the drawing API script.

The arrow tool would just be not using any of the previous methods :stuck_out_tongue:

Is it possible to mix the code you just commented and the freehand drawing?
If I just click in different points it draws a straigh line and if the mouse in down and moves, it creates free form drawings?

Yeah it is, using if statements and a variable to hold what mode the tool is in.

I don’t have time to work that out right now, but you got a bunch of points in the right direction :wink:

I think is time to experiment myself.
Thanks again!

Are you planning to go to university? Do u work in some design company or r u a freelance?

see u
:slight_smile:

No problem.

Am I planning on going to university?
I wanted to, but didn’t get accepted to any university because my high school jipped me out of a proper math education. Long story.

Do I work in a design company or do I freelance?
Erm, neither. I would love to work in a design company, that would totally rock. As for freelance, I often think about it, but sometimes I have my doubts on how good I am (i know i know) and I often talk myself out of it.

With your AS experience u could go very far.
Havent u had any job offer until now?
if u were living in my city I would hire u! :slight_smile:

hey, sorry for bad english! have to practice more!!!

I had 1 job offer, but they were in Canada and I am not, so that posed difficulties and never happened.

That’s it though. After I beef up my server-side skills (like PHP and mySQL) I my throw myself head first into the web design business.