Fading grid effect wont work in preloader and transition?

Hi guys

Got a bit of a problem, i have main.swf that has a preloader and transition to load external movies in it. In one of the external movies i used the fading grid effect on the backround pic. If you view the external movie on its own it works fine but when i try and view it on the main.swf page nothing happens. I think imaybe the actionscript of the fading grid effect needs to have a bit of a twick for it to work. Im dum when it comes to AS so im going to post it aswell. Please realy need help with this.

Thanks

:slight_smile:

//Declare variables
xspacing = box._width;
yspacing = box._height;
depth = 0;
box._visible = 0;
azcount = 0;
smoothness = 85;
//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+(xspacingi);
cur._y = image._y+(yspacing
k);
depth++;
}
}
//
//
// End of grid
//
//
function fadeOut(startboxnr, speed) {
fadeMC(startboxnr, speed);
}
function fadeMC(mcnr, speed) {
azcount++;
_root[“box”+mcnr].onEnterFrame = function() {
_root[“box”+mcnr]._alpha -= speed;
if (_root[“box”+mcnr]._alpha<=smoothness) {
_root[“box”+mcnr].onEnterFrame = null;
continueFade(_root[“box”+mcnr], speed);
mcnr += 1;
fadeOut(mcnr, speed);
}
};
}
function continueFade(mc, speed) {
mc.onEnterFrame = function() {
mc._alpha -= speed;
if (mc._alpha<=0) {
delete mc.onEnterFrame;
}
};
}
fadeOut(0, 5);