Are you using that code with Flash CS4 ?
Hi there people
I have created an image scroller that reacts to the position of your mouse on the stage using the tween class.
I would now like to modify it so it scrolls left to right smoothly without the need to react with the mouse.
Any tips much appreciated
Triad
Here is my code:
triad promotional merchandiseCode:onClipEvent (load) { xcenter=327; speed=1/60; } onClipEvent (enterFrame) { var distance=_root._xmouse-xcenter; _x+=(distance*speed); if (_x > 0.3) _x=-3278.3; if (_x < -3278.3) _x=0.3; }
Last edited by Flep; 05-12-08 at 13:25. Reason: add it to signature
Are you using that code with Flash CS4 ?
No Im using flash 8 but I plan to move it over to CS3 later today
as the computer i am on has only got flash 8
Cheers
triad promotional merchandise
Try this:
Code:onClipEvent (load) { xcenter=327; speed=1; } onClipEvent (enterFrame) { _x+=speed; if (_x > 0.3) speed*=-1; if (_x < -3278.3) speed*=-1; }
Bookmarks