sorry hamidb4, eccentris.com is taking too long to load for me to look. The original site you posted are using 2 functions(or at least 1 function used on 2 different arrays), one similar to mine which is the second to be called.You could probably do away with the random speed/random count altogether.
If you changed the code to this, you`ll see something like the first function which they use
function shuffle() {
return Math.round(Math.random());
}
createEmptyMovieClip(“paper”, 1);
createEmptyMovieClip(“paper2”, 2);
myArray.sort(shuffle);
function move() {
paper2.loadMovie(“pic”+this.k+“.jpg”);
this.swapDepths(-200-this.k);
this.gotoAndStop(5);
this.enabled = false;
for (var k = 5; k<15; k++) {
goOn.apply(clipa[k]);
}
}
function goOn() {
this.num = Math.round(Math.random()4)-2;
this.onEnterFrame = function() {
this.counter–;
if (this.counter<=0) {
this.counter = 0;
this._x += ((myArray[this.k+this.num][0])-this._x)/this.speed;
if (Math.abs(myArray[this.k][0]-this._x)<1 && Math.abs(myArray[this.k][1]-this._y)<1) {
this._x = myArray[this.k][0];
this._y = myArray[this.k][1];
delete this.onEnterFrame;
this.counter = random(5);
}
}
};
}
clipa = [];
function init() {
for (var i = 0; i<20; i++) {
myClip = paper.attachMovie(“mc”, “mc”+i, i2);
myclip.myText.text = i;
myClip.k = i;
myClip._y = myArray[myClip.k][1];
myClip._x = myArray[myClip.k][0];
myClip.speed = 10;
myClip.counter = random(5);
myClip.onPress = move;
clipa.push(myClip);
}
}
init();
at the end of this “goOn” function you would have to call the other function.
I made the original file in just a few mins, it was never ment to be a finished thing; was just to give you an idea of how it was made. If I have time later on in the week i`ll try and replicate the movement.