Sorry, again I’ve to come back here …
I’ve tried to randomly move the object on the stage. But the position shifting is not working properly. Sometimes the objects overlap with another one. Pls check the attached file
MCArray = [];
Xarray = [];
XarrayYpos = [];
for (var i = 1; i<5; i++) {
MCArray.push (_root["clip" add i]);
Xarray.push (_root["clip" add i]._x);
XarrayYpos.push (_root["clip" add i]._y);
}
function shuffle() {
return Math.round(Math.random());
}
function newGame() {
Xarray.sort(shuffle);
for (var i = 0; i<5; i++) {
MCArray*._x = Xarray*;
MCArray*._y = XarrayYpos*;
}
}
s.onPress = function() {
newGame();
};