Ive created a simple image that pans across (later on it will have buttons) using the infinite menu tute on kirupa.
Im having difficulty getting the speeds correct. Sometimes it goes too fast in one direction, how would I go about getting it to go the same speed both ways (obviously in relation to where the mouse is.
What confuses the issue more is that this infinite menu is called as an external swf. When viewed on its own, the menu acts one way, but then when viewed from the parent movie it behaves another way.
My infinte menu is 727px wide, however my main movie is 950 px wide (a left side menu takes up 123px). So should I set the xcenter to half of the 950, or the 727?
Ive tried all sorts of combos but to no avail. My spanning image is 2084px.
Here is my code:
onClipEvent (load)
{
xcenter=475;
speed=1/200;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distancespeed);
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distancespeed);
if (_x > 0) _x=-2084;
if (_x < -2084) _x=0;
}
This is the movie on its own:
http://www.3amdesign.com.au/lumo/new-website6/gallery.html
This is the movie within the parent movie (click the bottom link in the menu “contact”):
http://www.3amdesign.com.au/lumo/new-website6/