-
Stopping the Scroll!
I've got a moving menu that contains several thumbnails of movieClips. When you get the scrolling going and hover over a thumbnail, some text pops up. What I'd like to do is get the scrolling to stop when you hover over the movieClips (these movieClips each contain buttons to get the text to pop up). As it works now, the timeline is a bit of a pain to control in order to read the text. Here's the code:
Code:
onMouseMove = function(){
constrainedMove(bg_mc, 4, 1);
}
function constrainedMove(target:MovieClip, speed:Number, dir:Number){
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if(dir == 1){
mSpeed = mousePercent;
}else{
mSpeed = 1-mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function(){
if(target._x == target.destX){
delete target.onEnterFrame;
}else{
target._x += Math.ceil((target.destX-target._x)*(speed/900));
}
}
}
-
If I am reading your question correctly.. you want to stop the moving a some movieClip (that scrolls onMouseMove()?....correct?) when you touch one of the movieClips/buttons inside this moving clip?
can you remove the onMouseMove() function when you hit one of the 'buttons/clips'?
onMouseMove = function(){
//null
}
or try changing the parameters in the function call?
onMouseMove = function(){
constrainedMove(NULL, 0, 1);
}
then replacing it once you have moved off it?