Hi. I have just finished my new Flash site and I've got this one final problem.
It would be great if you could help me somehow. Please, visit this link: www.trusthead.com/main.html
As you might guess, I don't like the way background scrolls left or right. On my site, it starts to move even when the cursor is nearly in the middle of the page which can cause some problems when a viewer wants to click on any button. The best solution would be to tell the panorama to scroll only when the cursor reaches the left or right end of the movie. I have a good script but dunno what to add to make the background less sensitive.
The first frame contains this script:
The second:Code:// Xphoto = startposition of the scoll image xphoto = 399.9; // // Widthmovie = This variable hase to be set to the // same amount of the moviewidth / widthmovie = 800; // // Scrollspeed = The scollspeed of the image (high numbers result in slow scrolls 10=average) scrollspeed = 15; // // widthphoto = the width of your scrollable image in pixels/ widthphoto = 2400; _root.info.gotoAndPlay(2);
Code:// Setting the xmouse to 0 in the centre of the movie: ypozycja = _ymouse; if (ypozycja>0 and ypozycja<490) { xmouse = _xmouse-(widthmovie/2); // Setting the speed: speed = (xmouse)/scrollspeed; // If the speed is negative, the speed will be made positive here: if (speed<0) { speed = -(speed); } // If the mouse moves to left, the photo will scroll to the right: // (That makes sense.... Doesn't it!! ;-) if (xmouse<0) { xphoto = xphoto+speed; } // If the mouse moves to the right, the photo will scroll to the left: if (xmouse>0) { xphoto = xphoto-speed; } // Checking for the left end of the image: if (xphoto>1200) { xphoto = 1200; } // Checking for the right end of the image: if (xphoto<-400) { xphoto = -400; } // Placing the moviclip (photo) on it's new postition: setProperty("photo", _x, xphoto); //trace(_ymouse); }
It would be great if you could help me with this thing. I tried to figure it out but now Im lost.


Reply With Quote