Problems with fading grid!

I have some newbie problems following the Fading grid tutorial.
I have followed the steps exactly but get this error loading the movie;

…

A script in this movie is causing flash player to run slowly. If it continious to run, your computer may become unresponcible. Do you want to abort this script yes, no?

…

Ofcourse i dont want to abort it! What have i done wrong? I just copied and pasted the script as i was told?

Thanks!

That effect uses a lot of enterframe handlers, duplicate mcs and for loops. Maybe you have a picture way too big and/or a small movieclip being dupicated.

Pat,

Are you able to post your script for us to find the problem?

Cheers

Okay here you go guys!
I also attatched an screenshot!

Thanks!

…

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

…

Your first problem is that the variable ‘speed’ has no value.
Theres probably a few minor errors, I just have to find them.

Thanks man! :slight_smile:

Its strange that the code wont work since its an tutorial posted on this site… or maybe its me :slight_smile:

Sorry I was wrong. There is a speed variable set. I didnt see it lol
I tried the code out and it worked fine for me.
If your using Flash 5, I’m not sure if it will work due to changed syntax.

I attached the fla that worked for me. Compare the two and see if you can find anything different.

Cheers

Thanks man! Now it finaly works! Seems that i had missed some stuff. Your version was more easy to understand!

Thank you alot!

Your welcome :slight_smile:

Cheers

Boy … I really need to get that ugly _root fixed :!: