PDA

View Full Version : [mx] Help with coloring book



DDD
September 9th, 2003, 03:13 PM
I have 2 questions. Is it very hard to do thse coloring book things like for kids. You know when you have a picture and on the side you have color swatches. You click a color then click on a section of the picture and it colors that section that color?

My next question is can anybody recommend a tut or know where a tut is for this. Or for that matter a book that has a chapter or so on it. Doing a kid website anf they want one of those.

Any help greatly appreciated.

lostinbeta
September 9th, 2003, 03:23 PM
No, it's not that hard.

Each section = white movie clip symbol with correct shape, when pressed it uses the color object and setRBG to set the color

Swatches = buttons that when pressed set the value of a variable to a color that youw ill use with setRGB

DDD
September 9th, 2003, 03:31 PM
thanks lost. I will look up setRGB and try it out. If you have a snippet (nothing extensive I wanna learn it) Could you post it or a .fla?

lostinbeta
September 9th, 2003, 03:37 PM
Yeah I am working on a short snippet right now :) I was interested in trying it too (never have before)

lostinbeta
September 9th, 2003, 03:45 PM
Ok, I got a quick example using simple shapes and stuff.

DDD
September 9th, 2003, 03:54 PM
Got it!!! Hey thanks man. Oh and thanks for commenting the code. I am really trying to work on my AS but I am have a terrible time with it.

lostinbeta
September 9th, 2003, 03:58 PM
Cool :)

And of course I commented the code. I wouldn't give a .fla file just to say "here, take this and have a ball", commented code helps you learn what I am doing and will help you to be able to adjust the code for what you need.

As a note: I set all the clips to be white via actionscript by default because well... white clips on a white background are a pain to move around, so on the stage you can make them whatever color you want, and when you preview your movie it will automatically become white, and that will allow for ease of moving clips around on the stage :)