Hello,
I am placing 10 movie clips randomly within the stage using this simple script:
for(i=0; i<10; i++) {
var t = this.attachMovie("imgs","imgs"+i,i);
t.cacheAsBitmap = true;
t._x = Stage.width*Math.random(550);
t._y = Stage.height*Math.random(450);
t.onRollOver = function(){
this.swapDepths(this._parent.getNextHighestDepth());
}
}
What I am trying to figure out is how to keep all the objects contained within the stage bondaries. Right now some of them are going off screen when they are placed, and this looks goofy when placed in the HTML page I am creating.
Any ideas on keeping them contained in an area so the edges are all within said area?
thanks,
jsm_