PDA

View Full Version : scrolling image controlling speed w/mouse



webworks
March 13th, 2003, 12:54 PM
Hi everyone :)

I followed infinite menu tutorial somewhat successfully but not quite for this effect:
http://fenwickplantation.com/scrolling_gallery_fenwick2.html

The graphic is 2400 pixels wide and the movie is 600 pixels wide. But, for some reason it's skipping, and not showing the full image:
http://fenwickplantation.com/collage_2400.jpg What do I need to change in the code to make it roll continuously showing everything? I'm just clueless right now :crazy:

Here's the fla:
http://fenwickplantation.com/scrolling_gallery_fenwick2.fla

Any help so greatly appreciated:)


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

oops, forgot to paste code

kode
March 13th, 2003, 03:12 PM
onClipEvent (load) {
xcenter = 300;
speed = 1/50;
this._x = -2400;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x>0 ? _x = -2400 : _x<-2400 ? _x = 0 : _x += (distance*speed);
}
=)

webworks
March 13th, 2003, 03:17 PM
You rock! BIG thanks! :sure:

kode
March 13th, 2003, 03:18 PM
no problem ;)

darkstyle
September 5th, 2007, 08:44 AM
what do u mean by xcenter??