0 Replies Latest reply on Mar 18, 2007 4:44 AM by jagguy99

    flicker problem

    jagguy99 Level 1
      This code works but I want to add a 3rd picture to rotate on same spot (currently i do it with 2). How do i add another picture in without getting a flicker?

      //import mx.controls.ComboBox;


      var aval:Array= new Array();
      aval.push("50img2.jpg");
      aval.push("98img1.jpg");
      aval.push("50img2.jpg");

      var txt2:String;
      var txt11:String;

      var mLoad:MovieClipLoader = new MovieClipLoader();
      var mLoad2:MovieClipLoader = new MovieClipLoader();

      this.createEmptyMovieClip("mc1",this.getNextHighestDepth());

      this.createEmptyMovieClip("mc2",this.getNextHighestDepth());


      var tum:Number;
      var swap:Number;
      //var i:Number;
      //var j:Number;
      i=1;
      j=2;
      ii=0;
      jj=1;
      swap=0;
      loadpics(ii,jj);
      //trace(this["mc"+2]._x);
      //trace(88);
      tum=setInterval(fade,50,i,j);

      function fade(i:Number,j:Number):Void
      {

      if (_root["mc"+i]._parent._x >=0)
      _root["mc"+i]._alpha -=1;

      if (_root["mc"+j]._parent._x <=100)
      _root["mc"+j]._alpha+=1;

      if (_root["mc"+j]._alpha >=100)
      {
      _root["mc"+j]._alpha =100;
      _root["mc"+i]._alpha =0;
      //loadpics(1,2); flicker
      trace(i+" "+j);
      a=a+1;
      if (i==1)
      i=2;
      else
      i=1;
      if (j==1)
      j=2;
      else
      j=1;

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

      }


      function loadpics(ii:Number,jj:Number):Void
      {

      mLoad.loadClip(aval[ii],mc1);
      mc1._alpha=100;
      mLoad2.loadClip(aval[jj],mc2);
      mc2._alpha=0;

      //trace(this["mc"+2]._x);
      //trace(88);
      }