|
-
Inifinite scroll - almsot working, but need help
I have a movie clip I need to scroll infinitely from right to left, seamlessly.
In the first frame I have:
Code:
moveAmt = 40;
stop();
I then have two instances of one movieclip on the stage, "strip" and "strip2". On "strip" the following clip actions are applied:
Code:
//initialize
onClipEvent (load) {
percent_increment = .075;
addstrip2 = false;
}
onClipEvent (enterFrame) {
this._x -= (_root.moveAmt)*percent_increment;
//
if (this._x<=0 && this._x>=-this._width) {
_root.strip2._x = this._x+this._width-1;
_root.strip2._y = this._y;
trace("step 1");
}
if (this._x<=-this._width) {
this._x = _root.strip2._x+this._width-1;
trace("step 2");
}
if (this._x>0 && this._x<this._width) {
_root.strip2._x = this._x+this._height-1;
_root.strip2._y = this._y;
trace("step 3");
}
if (this._x>=this._width) {
this._x = _root.strip2._x-this._width+1;
trace("step 4");
}
}
They both scroll from right to left without a hitch, but then stop and don't loop like they should. What am I doing wrong?
Thanks in advance.
-
No one can help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|