Short code from ActionScript2 to ActionScript3

Hello,

I need some assistance. I am making a coloring book with coloring boxes and colorable areas.

The problem is that I have this code in ActionScript 2 but I need it in ActionScript 3.
Can someone help me?

This code is behind the red color box (MovieClip)
on (press) {
_root.r = 255;
_root.g = 0;
_root.b = 0;
}

This code is behind the colorable area: (MovieClip)
onClipEvent (load) {
myColor = new Color(this);
myColorTransform = new Object();
}
on (release) {
myColorTransform.ra = _root.r;
myColorTransform.ga = _root.g;
myColorTransform.ba = _root.b;
myColor.setTransform(myColorTransform);
}

The colorbook I am trying to do is similar to the tutorilas on the website
http://www.kirupa.com/developer/mx2004/coloringbook.htm