Howdy!
I have this scrolling gallery which is based on this script:
http://www.kirupa.com/developer/mx/infinite.htm
I have this little bit of code here:
onClipEvent (load)
{
ycenter=205;
speed=1/15;
}
onClipEvent (enterFrame)
{
var distance=_root._ymouse-ycenter;
_y+=(distance*speed);
if (_y > 0) _y=-410;
if (_y < -410) _y=0;
}
Problem is, that I angled my MC, so there is a gap between top left _y and bottom left _y, hence, the MC ‘jumps’ when the values are reseted.
Theoretically I know what I have to do:
when _y reaches certain position, I have to change _x value, so my MC is moved either to the left or to the right.
I wanted to manipulate _x position, so visually it stays always in the center. But my knowledge of AS is next to nothing, and really I have no idea where to start from.
I was wondering if anybody could help me out with that?
Thank you!
Best Regards,
~g.