Hi, I was doing the “Fading Grid” tutorial in Flash MX and I wanted to publish it for Flash Player 5. For some reason, it doesn’t work for Flash Player 5, but works for Flash Player 6. Any help would be appreciated.
The actionscript for “Fading Grid” is:
//Declare variables
xspacing = box._width;
yspacing = box._height;
depth = 0;
box._visible = 0;
azcount = 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+(xspacingi);
cur._y = image._y+(yspacingk);
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);