Link to home
Start Free TrialLog in
Avatar of John Carney
John CarneyFlag for United States of America

asked on

Getting a scrolling movie clip to stop upon mouse over

I have a movie clip of 6 contiguous images that move left or right depending on where the mouse is. But now I need something that will make it stop whenever the mouse is directly over it, and upon release will bring the user to the appropriate frame for information on that image, and/or bring up an enlargemt of that image, preferably zooming up in a visible tween.
This is a followup ro another question:  https://www.experts-exchange.com/questions/22991091/Moving-filmstrip-in-Flash-MX2004.html

Thanks!

John

ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of John Carney

ASKER

Sorry for being gone for so long.  I tried your code but I get the error "Statement must appear with on/onClipEvent handler" on 7 lines:
var xcenter = 150;
var speed = 1/10;
Start();
function Start()
function Stop()
this.onRollOver = function()
this.onRollOut = function ()

How do I fix that?

Below is the code I have that is working except that it won't stop completely on any given image, in case that is of any help.

Thanks,
John
onClipEvent (load)
{
   xcenter=360;
   speed=1/30;
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x+=(distance*speed);
   if (_x > 0) _x=-720;
   if (_x < -720) _x=0;
}

Open in new window

instead of clicking on the movie clip and then writing your actionscript, remove the code you have on that movieclip, double click (or right click and edit).  Create an empty layer and call it actions.  on the first keyframe add my code.
Sorry for being gone so long again. I got Flash CS3 3 orn 4 weeks ago, but this is the first chance I've had to test your solution.

Perfect, thanks!

Please take a look at this followup question:  https://www.experts-exchange.com/questions/23120488/Additional-behaviors-for-a-scrolling-movie-clip.html

Needless to say, my response time should be much faster now. :)