Play movie on mouse position

I have a movie clip which fades in and out containing navigation. I want to play the movie so that it ghosts in when the mouse is over it. I also want for it to fade out when the mouse goes out of the area of the movie clip. I have written the following code which i have paced on the timeline. I cant get it to work. Could any of you flash genui help.

if (_root._ymouse < 70 and _root._ymouse > 220) {
_root.artmenu.gotoAndPlay(“2”);
} else if (_root._ymouse >70 and _root._ymouse<220) {
artmenu.gotoAndPlay(“17”);
}

Cheers,

are you looping through this code? ie is there something which makes the main play head continually hit the frame that contains this code? If not… it will only be checking the location once.

I would suggest this

on the movie clip itself place this

OnClipEvent(mouseMove){
if (trip) {
this.gotoAndPlay(“2”);
} else if (!trip) {
this.gotoAndPlay(“17”);
}
}

then on the button I’d put this.

on(rollOver){
_root.artmenu.trip=true;
}
on(rollOut){
_root.artmenu.trip=false;
}

or is there a specific reason why you need to use coordinates to do it. (I have run into a couple in my time)

artmenu is a movie clip containing several buttons for navigation not a single button. Sory if i did not explain my self clearly. Exactly what I want to do is when the mouse is in the area of the movie clip defined by co-ordinates it goes to frame 2 of the movie clip and plays. When the mouse is outside the area of the movie it goes to frame 17 and plays. I hope someone can still help.

Cheers,

like david said… if you don’t need to use coordinates… I’d use something like this:


onClipEvent (load) {
	this.useHandCursor = false;
}
on (rollOver) {
	this.gotoAndPlay(2);
}
on (rollOut) {
	this.gotoAndPlay(17);
}

simple and effective. hope that helps…

cheers

sorry… we posted at the same time… :-\