potresti fare una cosa del genere
inserire l'immagine di sfondo sullo stage convertirla in mc e instanziarla image
poi creare un quadrato convertirlo in mc e istanziarlo box
e poi sul frame copiare e incollare questo
codice://Declare variables xspacing = box._width; yspacing = box._height; depth = 0; box._visible = 0; smoothness = 90; //Calculate positions and values amH = Math.ceil(image._width/box._width); amV = Math.ceil(image._height/box._height); //border._height = image._height+1; //border._width = image._width+1; //border._x = image._x-0.5; //border._y = image._y-0.5; //Create grid for (i=0; i<amH; i++) { for (var k = 0; k<amV; k++) { box.duplicateMovieClip("box"+depth, depth); cur = this["box"+depth]; cur._x = image._x+(xspacing*i); cur._y = image._y+(yspacing*k); depth++; } } function fadeOut(startboxnr, speed) { fadeMC(startboxnr, speed); } function fadeMC(mcnr, speed) { this["box"+mcnr].onEnterFrame = function() { this._alpha -= speed; if (this._alpha<=smoothness) { this.onEnterFrame = null; continueFade(this, speed); mcnr += 1; fadeOut(mcnr, speed); } }; } function continueFade(mc, speed) { mc.onEnterFrame = function() { this._alpha -= speed; if (this._alpha<=0) { delete this.onEnterFrame; } }; } fadeOut(0, 5);
ciao

Rispondi quotando