Infinite menu needs to stop

i have an infinite scrolling menu that works great. now, of course, it needs to stop whenever the mouse is not over the MC. any ideas? heres the script as written now:


_root.onEnterFrame = function() {
	_root.menu_mc._y += (.5*Stage.height-_ymouse)/10;
	if (menu_mc._y<-701) {
		menu_mc._y = 0;
	}
	if (menu_mc._y>0) {
		menu_mc._y = -701;
	}
};

to recap, when the mouse is over the menu, it needs to scroll. when it is NOT over the menu, it needs to stop. Thanks.

_root.menu_mc.onRollOver=funcion(){
 this.scroll=true
 }
 _root.menu_mc.onRollOut=funcion(){
 this.scroll=false
 }
 _root.menu_mc.onEnterFrame = function() {
 if(this.scroll==true){
 this._y += (.5*Stage.height-_ymouse)/10;
 if (this._y<-701) {
 this._y = 0;
 }
 if (this._y>0) {
 this._y = -701;
 }
 }
 };

or

_root.menu_mc.onRollOver=funcion(){
 this.onEnterFrame = function() {
 this._y += (.5*Stage.height-_ymouse)/10;
 if (this._y<-701) {
 this._y = 0;
 }
 if (this._y>0) {
 this._y = -701;
 }
 };
 }
 _root.menu_mc.onRollOut=funcion(){
 delete(this.onEnterFrame)
 }
    

doesn’t work out. the menu is at a stand still. even when i changed “funcion” to “function”. anymore ideas?

huh?!
_root.menu_mc.onRollOver=function(){
this.onEnterFrame = function() {
this._y += (.5*Stage.height-_ymouse)/10;
if (this._y<-701) {
this._y = 0;
}
if (this._y>0) {
this._y = -701;
}
};
}
_root.menu_mc.onRollOut=function(){
delete(this.onEnterFrame)
}

if you roll over the mc, it starts scrolling. :h:

no…the menu sits in one spot…no scrolling when i rollOver it.

would there be any way to create variables for the menu using rollOver/rollOut (such as maybe rollOver=true and rollOut=false), then tell the menu “if…menu=true, play the scrolling menu”

not sure how to word all of this…thats where the help comes in. any help would be cool! thanks

anybody have ANY ideas…or am i SOL?

I still don’t see any problem

it needs to stop whenever the mouse is not over the MC.

what about

_root.onEnterFrame = function() {
	if(_root._xmouse<200){
	_root.menu_mc._y += (.5*Stage.height-_ymouse)/40;
	if (menu_mc._y<-701) {
		menu_mc._y = 0;
	}
	if (menu_mc._y>0) {
		menu_mc._y = -701;
	}
	}
};

where 200 is the border between menu and the rest of the movie

well i would go for mcgivers option =)

mcgiver…your script worked great for your movie. the problem (and i’m not sure why) is that on my movie, my scrolling menu has several different buttons within it that link to other MCs. with your script i could either have the buttons active (and the menu would not scroll) OR i could have the menu scroll (and the buttons wouldn’t work)…i have no idea what was keeping the both of them from working together.???

2nd day…your script worked out great. thanks

thanks for the help from both of you (and anyone else who took the time to help out). THANKS AGAIN

of course.
if you call an on method on a parent clip, all “on” stuff inside gets disabled.

just for the records:
some way to avoid that would be i.e.:

_root.menu_mc.sometransparentmc.onRollOver=function(){
this.onEnterFrame = function() {
_parent._y += (.5*Stage.height-_ymouse)/10;
if (_parent._y<-701) {
_parent._y = 0;
}
if (_parent._y>0) {
_parent._y = -701;
}
};
}
_root.menu_mc.sometransparentmc.onRollOut=function(){
delete(this.onEnterFrame)
}

right…thats good to know. so you DO learn something new everyday, who knew (well…you of course). anyway, thanks again. by the way, i like your “pocket tanks” game you have going on with your posts…