views:

41

answers:

0

I'm using an interval for fade in effect of some objects in flash, but for some reason I can't get it to work if it's called on more than one object.

function fadeInPage (pageName) {
 pageName._visible = true;
 alpha = 0;
 fade = setInterval(fadeIn, 15);
 function fadeIn() {
  alpha += 5;
      pageName._alpha = alpha;
      if (alpha>=100) {clearInterval(fade);}
      } 
}

I must be missing something obvious, please help!