# Coloring book game

**URL:** <https://forum.kirupa.com/t/coloring-book-game/6237>\
**Category:** flash\
**Created:** [October 2, 2002, 2:06pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237 "2002-10-02T14:06:49Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbrown](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vbrown](https://forum.kirupa.com/u/vbrown)\
**Post date:** [October 2, 2002, 2:06pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/1 "2002-10-02T14:06:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 2:11pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/2 "2002-10-02T14:11:07Z")

</div>

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

Try [http://www.permadi.com/tutorial/flash5Color/](http://www.permadi.com/tutorial/flash5Color/)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 2:16pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/3 "2002-10-02T14:16:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 2:20pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/4 "2002-10-02T14:20:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 2:27pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/5 "2002-10-02T14:27:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 2:34pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/6 "2002-10-02T14:34:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 2:44pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/7 "2002-10-02T14:44:28Z")

</div>

You’re welcome.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2002, 11:44am UTC](https://forum.kirupa.com/t/coloring-book-game/6237/8 "2002-10-03T11:44:53Z")

</div>

You can also check the droptarget tutorial on this site.

pom 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2002, 12:30pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/9 "2002-10-03T12:30:03Z")

</div>

Thanks to the [permadi.com](http://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.  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2002, 12:59pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/10 "2002-10-03T12:59:45Z")

</div>

Thanks to the [permadi.com](http://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.  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 3, 2002, 3:42pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/11 "2002-10-03T15:42:11Z")

</div>

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

pom 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 8, 2002, 3:36pm UTC](https://forum.kirupa.com/t/coloring-book-game/6237/12 "2002-10-08T15:36:07Z")

</div>

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;  
}  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 9, 2002, 3:31am UTC](https://forum.kirupa.com/t/coloring-book-game/6237/13 "2002-10-09T03:31:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 13, 2002, 11:28am UTC](https://forum.kirupa.com/t/coloring-book-game/6237/14 "2002-10-13T11:28:02Z")

</div>

Will try this. Many thanks.
