Skip to main content
Inspiring
May 10, 2006
Answered

how to stop my scroll

I have a movie clip that I am scrolling vertically in one direction (to keep it simple for this question) when you move your cursor over a button (movie clip that acts as a button. When you roll off it stops scrolling.
Everything is working so far in the code etc.
But what I need to know is what to insert in the code to stop the movie from scrolling at some point, even if you roll over, otherwise it will eventually scroll right off the screen.

This is what I have so far.

sphereButton.onrollOver = function() {
this.onEnterFrame = function() {
spinner._y += 10;
};
};
sphereButton.onrollOut = sphereButton.onrollOutOutside=sphereButton.onDragOut=function () { delete this.onEnterFrame;};


Spinner is the name of the mc and sphereButton is the name of the button.
Can someone show me what to insert into the code to make it stop at some point even when you rollover?
Thanks for any help.
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer
May 10, 2006
sphereButton.onRollOver = function() {
this.onEnterFrame = function() {

if(spinner._y>200)
{
delete sphereButton.onEnterFrame
}
else
{spinner._y += 10;
}
};
};
sphereButton.onRollOut = sphereButton.onDragOut=function () {
delete this.onEnterFrame;
};


There are lots of ways... Maybe this helps you...

Hakan K
www.FlashDersi.com

2 replies

NevermyndAuthor
Inspiring
May 11, 2006
Thanks! That did the trick!
Translate
Correct answer
May 10, 2006
sphereButton.onRollOver = function() {
this.onEnterFrame = function() {

if(spinner._y>200)
{
delete sphereButton.onEnterFrame
}
else
{spinner._y += 10;
}
};
};
sphereButton.onRollOut = sphereButton.onDragOut=function () {
delete this.onEnterFrame;
};


There are lots of ways... Maybe this helps you...

Hakan K
www.FlashDersi.com
Translate