# Publishing

**URL:** https://forum.kirupa.com/t/publishing/40929
**Category:** Uncategorized
**Created:** [January 23, 2004, 3:56pm UTC](https://forum.kirupa.com/t/publishing/40929 "2004-01-23T15:56:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![b00tz](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@b00tz](https://forum.kirupa.com/u/b00tz)
#### Post date: [January 23, 2004, 3:56pm UTC](https://forum.kirupa.com/t/publishing/40929/1 "2004-01-23T15:56:22Z")

</div>

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+(xspacing_i);  
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);
