I have a .swf that works OK but I would like the effect to be an automatic scroll back and forth horizontally.
How can I make it get to far left and then scroll nicely back to far right and start again indefinitely?
I am using:
Quote:
onClipEvent(load) {
speed = 5;
}
onClipEvent(enterFrame) {
this._x += speed;
if ( this._x > 850 ) this._x = 0;
}
|
and...
Quote:
mouseX = _xmouse;
menuX = menu._x;
if (mouseX>480) {
diff = (mouseX-480)/200;
}
if (mouseX<420) {
diff = (420-mouseX)/200;
}
if (mouseX<=450 && menuX<=850) {
setProperty("menu", _x, menuX+diff);
}
if (mouseX>=450 && menuX>=-600) {
setProperty("menu", _x, menuX-diff);
}
if (menu._x>=850) {
menu._x = 850;
} else if (menu._x<=-600) {
menu._x = -600;
}
gotoAndPlay(2);
|
Thanks if anyone has any ideas.