Help with MOUSE_OVER and MOUSE_OUT events
Hello,
I'm very new to Flash and I'm having a bit of an issue with my first ActionScript.
I am working on a project where I have a black and white picture. When you mouse over the picture, it turns to a color version of the same picture. When you take your mouse off of the picture, it goes back to black and white.
I have three instances of the picture, a black and white image at frame 1, a color image at frame 10, and a black and white image at frame 20. Currently, when I mouse over the black and white picture, it turns to the color picture like I had hoped. However, when my mouse leaves the picture, it stays on the color picture.
My code looks like this:
import flash.events.MouseEvent;
stop();
btnCory.addEventListener(MouseEvent.MOUSE_OVER, coryOn);
btnCory2.addEventListener(MouseEvent.MOUSE_OUT, coryOff);
function coryOn(event:MouseEvent):void {
gotoAndStop(10)
}
function coryOff(event:MouseEvent):void {
gotoAndStop(20)
}
btnCory is the first black and white picture at frame 1, btnCory2 is the color picture at frame 10.
Any feedback / help would be much appriciated.
Thanks,
Jeremy
