Coloring book help

Hi, I’m relatively new to using Flash MX, but one of the reasons I’m learning is to create a coloring book application.
I’ve seen a few around the web and it works well.

What happens is - you have a selection of colors to choose from with a mouse cursor that looks like a paint brush, then you click on a section of a black and white drawing and it turns into that color.

Is someone able to point me to a tutorial or something that will help me to achieve this?

Thanks,
davesclubsport :-\

welcome to kirupa forum davesclubsport !! =)

i guess the easiest way would be changing the lineStyle()

example:

// button to change the color to white
on (release) {
MovieClip.lineStyle (1, 0xFFFFFF, 100)
}
// button to change the color to black
on (release) {
MovieClip.lineStyle (1, 0x000000, 100)
}

remember …
lineStyle (thickness, rgb, alpha)

[size=1][ EDIT ]

haha :stuck_out_tongue: i beat ya playamarz !!
hey … it feels so good. lost always beats me :-[/size]

Actually… This wouldn’t be too awfully hard to do…

First… Go and read the tutorial on this site that covers how to change the RGB color of a movieClip…

You want to be able to then change your cursor to something cool… Like an actual paintbrush and change the tip of it to reflect the color change of picking a different color… When you pick a color from the side… It’s rgb values will be stored in a small array for you to use later.

After you are done reading that… Incorporate this piece of code inside of the movieCLip that would be colored say green…


on(press)
{
     this.colorIt(currentColor);
}

That’s it for the code that belongs in the movieCLips… But what is that function we called… colorIt? Well… You wnat to put this piece of code in the first frame of your movie unless a pre-loader is there… Then just put this in the second frame.


MovieClip.prototype.colorIt = function(thisColor)
{
    colorThis = new Color(this);
    colorThis.setRGB(thisColor);
}

Now… Noted… The rgb is in hexadecimal… If you’ve ever worked with HTMl you may have seen something like this before #FFFFFF It’s saying… This color is white. #000000 that would equal black… And then everything in between would equal the colors you would need t use… Most programs like Flash… show you the hexivalue…

Now… With Flash though… You need to put 0x in front of all of these… Sooo…

0x000000 = Black
0xFFFFFF = White
and so on and so forth

I hope this helps you out.