Coloring book game

Would be most grateful if anyone could help with this.
I am trying to create an effect for a game where the cursor takes the form of a paintbrush with different colors when clicked on different coloured paintpots (have started with this for two colours red and blue tho this could also probably be done better).
Then when clicked on the coloring book area, the colour will be applied to the area clicked on ie red brush makes it red, blue brush makes it blue, etc.
Not very wise in the ways of actionscript so can anyone advise?
The fla is attached.

I can’t open your fla for some reason. Get an unexpected file format.

Try http://www.permadi.com/tutorial/flash5Color/

Am sending again. This is a Flash 5 mac file. Hope you can open it this time.
Thanks

No joy. I’m running MX on a PC.

This time it is MX. Sorry for the trouble. Can’t think of anything else if no luck this time.

dear Flex
Will try the recommended tutorial. it looks v useful. Many thanks.

You’re welcome.

You can also check the droptarget tutorial on this site.

pom :slight_smile:

Thanks to the permadi.com tutorial, I now have exactly the effects I want.
Will now look at the droptarget tutorial, which also looks relevant.
Am SO appreciative of all the above advice.
:slight_smile:

Thanks to the permadi.com tutorial, I now have exactly the effects I want.
Will now look at the droptarget tutorial, which also looks relevant.
Am SO appreciative of all the above advice.
I just have one problem to solve now. That is to get a reset button to restore the image to black and white as when the movie first starts.
:slight_smile:

Well, you ca, setRGB as well, 0x000000 being black and 0xffffff being white.

pom :slight_smile:

Please can you advise how to reset the game by a sort of reset button, so the colors go back to white when it is clicked. I can’t see how to make the areas revert, because the code which makes the areas change color is attached to buttons embedded in movie clips. The code is all adapted from the Permadi tutorial but he does’nt include any reset function.
Here is the code used, hope it makes sense.
1This is on the embedded buttons inside the painting area:
on (press) {
iColor=new Color(this);
iColor.setRGB(_root.fillColor);
delete iColor;
}

2This is the code on a button which fills the area red when it is pressed:
on (press) {
fillColor=0xFF0000
}
on (release) {
cursordrag_red._visible=1;
cursordrag_blue._visible=0;
cursordrag._visible=0;
Mouse.hide();
startDrag (“cursordrag_red”);
tellTarget (“cursordrag_red”) {
_x = /:_xmouse;
_y = /:_ymouse;
}
}

I would create a start function that simply resets everything to the starting state… So… write down all your starting options (this thing is that color, that thing is this color, this goes there, that goes over there…

…then, attach the function to a button (or wherever)

Does that make sense?

Will try this. Many thanks.