View Full Version : coloring book
DHSDrum
08-11-2005, 06:54 PM
Can anybody help me figure out how to make an online coloring book? I am new to Flash, and still have a whole lot to learn, but I am a fast learner...
here's what I have so far on the objects I have been messing around with:
actions for red_btn:
on (release)
{
var colorful = new Color ("currentcolor")
colorful.setRGB(0xFF0000)
fillColor = 0xFF0000
}
actions for blue_btn:
on (release)
{
var colorful = new Color ("currentcolor")
colorful.setRGB(0x0000FF)
fillColor = 0x0000FF
}
the problem is that no matter which button I push the object "currentcolor" turns red...I'm sure that this is probably pretty simple to fix, but I would appreciate any help.
Paerez
08-12-2005, 06:55 PM
The way Colors work is confusing, I dont blame you :D
It goes like this:
var colorful = new Color (my_movie_clip)
colorful.setRGB(0xFF0000)
This will change my_movie_clip to be red.
So instead of the "currentcolor" that should be a reference to the movie clip that you want to change the color of, more like this:
[as]var dinosaur:MovieClip;
var red_button:MovieClip;
red_button.onRelease = function() {
var temp = new Color(dinosaur);
temp.setRGB(0xFF0000);
}/[as]
voila, red dinosaur.
Colors are weird.
Good luck
p.s. you dont need the fillcolor thing. At least, when I color things I dont do it and it works.
DHSDrum
08-14-2005, 04:22 AM
thank you very much. One more thing...after I select the color and my movie changes...is there a way to make certain parts of the coloring page change to the color of my current_color movie, but only when I click them?
Paerez
08-14-2005, 07:19 PM
In terms of making a coloring book, you could do it like this:
Make a whole lot of seperate movie clips for each cell of the coloring book. By cell I mean an area which is seperate from other areas, that will be one color. So if you had a person, the head would be a cell, the body a cell, the arms and legs each seperate cells.
Then on each frame of the movie clip you have a different assortment of cells. All the cells have a onRelease = {set the clips color to the color on your color picker} like we discussed above.
A harder but probably better way to do it is to have one movie clip for "Dinosaur" then, with that clip have a "head", "body", "tail" etc. The inner pieces have the code we talked about. Then, you could re-use the dinosaur symbol whenever you wanted, without having to create it all over again using it's pieces.
So, the bottom line is, if you want one part of the book to change color by clicking on it, that part must be its own MovieClip, seperate from the others on the stage that you don't want to change.
Good Luck
DHSDrum
08-24-2005, 04:48 PM
thank you very much....the coloring book is working just fine now. One more question though....is it possible to make one of the color selection buttons out of a scanned image made of more than one color?....I am trying to use the carpet swatches I scanned as the color selection buttons, but I can't do it the way stated above because it is more than one color. If it is possible can someone help me figure it out, and if it's not, someone please tell me? It would be greatly appreciated.
podaskos
08-04-2006, 07:09 AM
hi to all,
Coloring Book is good game for the children. I have made one, but I want to display a message in the end that say for example: you colored the house red, the garden green etc.
Any idea and help for this??
Dim
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.