Gallery moves all the time

…and I don’t want it to!

Have a look at http://www.betsytaylor.co.uk/test/gallery.html - you’ll see that the gallery moves all the time, at whatever speed it is left at.

I’d love it be paused when first landing at the page, either scrolling over a hotspot or entering the mask to make it scroll and stops moving when the area is exited.

Any ideas?

Cello

PS Thanks to Guig0 for the initial idea of using the ‘Infinte Menu’ as a gallery - works well!

Allign it in your movie with the location it wants to stop at. That way when it loads it will show up in that same place at first, and wont need to move

Oh I see it just keeps going and going and going… Hum, lemmy go look at the code in that tutorial

Morse - you’re right and that’s what I did (but didn’t make it very clear from my original post!).

You’ll see that whenever that mouse moves to left or right of centre line in the scene that the bottom gallery starts to scroll. I imagine most users might find this distracting or confusing.

So, ideally the gallery stays still until the mouse is in the active area of the mask. And when the mouse leaves mask the gallery eases to a stop.

This is the code that does the work:

onClipEvent (load)
{
   xcenter=266;
   speed=1/100;
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x-=(distance*speed);
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x-=(distance*speed);
   if (_x > 0) _x=-518;
   if (_x < -518) _x=0;
}

It just needs a little refining to get to what I want it to be - any suggestions would be really appreciated.

Cello

Edited to apologise for cross-posting :sigh:

Ah yes, I just found it here: http://www.kirupa.com/developer/mx/infinite.htm

Its written by pom, and hes realllllly good.

You could always make the entire thing into a new movie clip and put it in the second frame. In the first frame have stop() and then on(rollOver){gotoAndStop(2)}
I dunno if that would work. It might. Have just the images in the first frame and then all that code with the images in another mc in the second, if you know what i mean.

I dont know if that would work, just an idea. Does it?


onClipEvent (load) {
   xcenter=266;
   speed=1/100;
}
onClipEvent (enterFrame) {
	if(_ymouse>200 & _ymouse<300) {
  	 var distance=_root._xmouse-xcenter;
  	 _x-=(distance*speed);
	}
}
onClipEvent (enterFrame) {
	if(_ymouse>200 & _ymouse<300) {
  		var distance=_root._xmouse-xcenter;
  	 	_x-=(distance*speed);
	}
  	if (_x > 0) _x=-518;
  	if (_x < -518) _x=0;
}

edit the “200” and “300” values for the top of your taget area and 300 for the bottom of it.

sry it dosnt glide to a end :-/

Thx for your replies. Unfortunately one has no effect at all (gallery still speeds on) and with _ymouse method stops the gallery moving completely!

Any further thoughts? All replies appreciated.

Cello

Hi

I had the exact same problem with one of my projects earlier on… What I ended up doing was moving the entire scene (gallery in your case) into a completely separate .swf and then load it in through loadMovieNum (“gallery.swf”, #), and that way when the mouse is not in that area, it will be out of the .swf and therefore the mouse movements will not correspond…

so…thats one way of doing it…

Let me know if this works for you, and also if you do find the “correct” way of doing it…

good luck