Code Check

Hi,

I have the following code on the second frame of my root timeline:

function preloadF(){
picA=[“sky.jpg”,“white.jpg”] //<- array of your path/pics
buttonA=[sky_btn,white_btn]
for(var ivar=0;ivar<picA.length;ivar++){
rclip=_root.createEmptyMovieClip(“swatch_mc”+ivar,_root.getNextHighestDepth());
rclip._alpha=0;
rclip._x=20;
rclip._y=20;
rclip.loadMovie(picA[ivar]);
}
}
for(var ivar=0;ivar<buttonA.length;ivar++){
buttonA[ivar].jvar=ivar;
buttonA[ivar].onRollOver=function(){
_root[“swatch_mc”+this.jvar]._alpha=100;
}
buttonA[ivar].onRollOut=function(){
_root[“swatch_mc”+this.jvar]._alpha=0;
}
}

Basically I want the user to rollover either of the two buttons and have the images load and then onrollout the transparency is set to 0. I have the jpegs in the same directory as my swf file but when I test it the code doesn’t seem to work. I get the hand link symbol indicating that each of the buttons is a hot spot but no image loads.

Would someone mind checking the code to see if there are any errors?

Thanks for any help offered.