
attachMovie should be addchild()
_x should be just x
I cant figure out what t.dx should convert to.
for(i=0;i<25;i++) {//number of instances
var t = this.attachMovie("dstream","dstream"+i,i);
t._x = Math.random()*1000;
t._y = Math.random()*1000;
t.dx = Math.round(Math.random()*1000);//destination coordinates
t.dy = Math.round(Math.random()*1000);
t._xscale = Math.random()*150+40;//scale of object
t._yscale = t._xscale;
t.onEnterFrame = mover;
}
function mover() {
this._x += (this.dx-this._x)/100;//easing of motion
this._y += (this.dy-this._y)/10;//easing of motion
if(Math.round(this._x) == this.dx) {
this.dx = Math.round(Math.random()*775);
this.dy = Math.round(Math.random()*600);
}
}
any help would be much appreciated!
thanks,
If you would like to make a comment, please fill out the form below.
Recent Comments