on (release) {
canvasshade=new Color(_root.canvasbehind) ;
canvasshade.setRGB(_root.currentcolor) ;
_root.isactive=null;
}
Youll notice that this uses _root.currentcolor again, the variable that reflects the current active colors hex code; this script fetches the value of the currently selected paint color, and passes it to the setRGB function to change the canvass fill to that color.
Youll also notice that theres another variable there: _root.isactive. Clicking this tool sets that variable to null, meaning that it has no value assigned to it but keep an eye on that, as its going to be as important as _root.currentcolor in upcoming lessons. _root.isactive is assigned a new value each time that a tool is clicked, and when drawing Flash checks the value of _root.isactive against conditional if statements to determine which behavior to follow.
You can ignore the additional part in the image about the rollover tooltips. All that does is use dynamic text to change the text inside the little tool title display at the top to reflect the tool name each time the mouse rolls over the button. Its strictly optional, and fairly easy to figure out on your own.


