Continuous movement tutorial

I played around with the “continuous movement” tutorial for along time and was facinated by it! I fiddled w/ the code for awhile and i came up with something that i thought just maybe someone would be interested in.

first off, i got the motion to work in both directions. In doing so, i found another way to “respawn” the points to create a smoother field of dots.

instead of this line:

this._x = -1000

(which respawns the dot far from its ORIGINAL position) try this:

this._x = location - (size of movie + 20)

if you are interested here is the code that moves both ways based on a movie clip in the center called “center”, try using this modified version of the code in the tutorial:

onClipEvent (enterFrame) {
location = this._x;
var i;
i = _root.center._xmouse/10;

if (i>0){
if (this, hitTest(_root.block)) {
this._x = location-400;
} else {
this._x = location+i;
}
}

if (i<0){
if (this, hitTest(_root.block2)) {
this._x = location+400;
} else {
this._x = location+i;
}
}

}

I’m a total newb, but i learned alot from just playing around w/ that tutorial. Thanks for the great site!

maybe this should have gone under actionscripting :-\