gotoAndPlay() problem

My movie clip is acting randomly. It plays my “Over” function when the cursor is over it, however, at times it also plays the “Out” function when the cursor is still on the clip.

I think that the problem is with my code and not the movie clip itself. Can someone please help?

I’ve attached my .fla file for reference. Playing the .swf file makes me think that the movie clip is “listening” to the elements it contains inside. Could this explain why my movie clip plays the “out” frame when the mouse cursor is still over the movie clip?

var cliparray:Array= [clip01, clip02, clip03, clip04];

for each(var clip:MovieClip in cliparray) {
clip.addEventListener(MouseEvent.MOUSE_OVER, Over, false, 0, true);
clip.addEventListener(MouseEvent.MOUSE_OUT, Out, false, 1, true);
}

function Over(e:MouseEvent):void {
e.currentTarget.gotoAndPlay(“over”);
}
function Out(e:MouseEvent):void {
e.currentTarget.gotoAndPlay(“out”);
}

I’ve fixed this problem with the following changes: ROLL_OVER instead of MOUSE_OVER; and ROLL_OUT instead of MOUSE_OUT. Still, I don’t know why using “ROLL” works while using “MOUSE” does not.

On a related side question… how can I get the cursor to change to a hand when it moves over the movie clips?

For anyone interested… I’ve attached the new .fla file that works.

MOUSE_OVER / OUT would also work if you set clip.mouseChildren to false.

Roughly speaking, mouseover/out also affect the clips inside your clip. Rollover/out just affects the base, and it doesn’t bubble.

Thank you very much for your response. Everything works now–the cursor even changes its shape to a hand now.

This is the new code:

var cliparray:Array= [clip01, clip02, clip03, clip04];

for each(var clip:MovieClip in cliparray) {
clip.buttonMode=true;
clip.mouseChildren=false;
clip.addEventListener(MouseEvent.MOUSE_OVER, Over, false, 0, true);
clip.addEventListener(MouseEvent.MOUSE_OUT, Out, false, 1, true);
}

function Over(e:MouseEvent):void {
e.currentTarget.gotoAndPlay(“over”);
}
function Out(e:MouseEvent):void {
e.currentTarget.gotoAndPlay(“out”);
}

The new file is attached.

Oops… posted the wrong file.