# Help with Coloring Book \[CS5:AS2\]

**URL:** <https://forum.kirupa.com/t/help-with-coloring-book-cs5-as2/312188>\
**Category:** Uncategorized\
**Created:** [July 27, 2010, 6:23pm UTC](https://forum.kirupa.com/t/help-with-coloring-book-cs5-as2/312188 "2010-07-27T18:23:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerry\_rnl](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@kerry\_rnl](https://forum.kirupa.com/u/kerry_rnl)\
**Post date:** [July 27, 2010, 6:23pm UTC](https://forum.kirupa.com/t/help-with-coloring-book-cs5-as2/312188/1 "2010-07-27T18:23:07Z")

</div>

I made a coloring book game in AS 2.0 (I did it this way so that I could put individual pieces of code for various buttons - there are around 50). I based it off a tutorial I found online. It works really well. These are the codes I used:

In a top layer, I have just in frame 1 (there is only one frame in the whole thing):  
\_root.fillColor = 0xFFFFFF;

Each colorable part of the picture is a movie clip with a button inside, and each of those buttons has the following code:  
on (press) {  
color = new Color(this);  
color.setRGB(\_root.fillColor);  
delete color;  
}

And then I have two color buttons they can “dip” their pointer into, then they can click on the colorable areas and color them. The code for the color buttons is:  
on (release) {  
\_root.fillColor = 0xC71E07;  
\_root.brush.gotoAndStop(8);  
}

Note: the hex code there is for the red button; it’s different for the other color.

Anyway, so this all works really well. What I need now are two buttons that I have NO idea how to make.

Button 1: A “show answer” button that pops up a little graphic showing what their picture should look like. I know how to do this in AS 3.0 (I would just have the object fly in from off-stage on the button press), but not in 2.0. One thing I tried was to have it skip to a different scene or even just a different frame in which that object exists in place. The issue there is that it causes the coloring the user has done to disappear.  
Button 2: A “clear board” button that resets the whole thing. I’ve tried using the gotoandPlay(1) action with this button, but it doesn’t do anything.

Any help would be much appreciated. Thanks.
