0 Replies Latest reply on Mar 25, 2007 11:53 PM by jagguy99

    rotatting pic delay problem

    jagguy99 Level 1
      Hi,

      I have a picture that rotates with a fade into another picture. It works fine.

      I want to keep the picture alpha=100 just sitting there for a few minutes then perform the fadeInterval to change next picture. If I set a longer delay in setInterval the it just fades the picture slowly and you see a bad picture for while.

      tdelay=100;
      fadespeed=1;
      tum=setInterval(fade,tdelay,0,1);

      function fade(i:Number,j:Number):Void
      {
      _root["mc"+i]._alpha -=fadespeed;
      _root["mc"+j]._alpha+=fadespeed;

      if (_root["mc"+j]._alpha >100)
      {
      _root["mc"+j]._alpha =100;
      _root["mc"+i]._alpha =0;

      i++;
      j++;
      if (j==3) j=0;
      if (i==3) i=0;

      clearInterval(tum);
      tum=setInterval(fade,tdelay,i,j);
      }



      }
      //i added this
      I just want a pivture to show for a few minutes and then change.
      If I set dummy delay like this it fails to work.

      uu=0;
      tum2=setInterval(wait,200);

      if (tum2==NULL)
      tum=setInterval(fade,tdelay,0,1);


      function wait():Void
      {
      i=1;j=1;
      if (_root.uu==2)
      clearInterval(tum2);

      trace(tum2);
      _root.uu=2;


      }