0 Replies Latest reply on Aug 19, 2010 10:51 AM by cotzo1987

    need something help. how replay a banner?

    cotzo1987

      Hi,

      I have one banner in flash, and i want make this replay on finish action. I try whit loop in html, i try gotoAndPlay(2) but don't worrk. please help whit one solution, rezolv this.

       

      This is code on actions script:

       

       

       

      rect._visible = 0;
      counter = 1;
      VnumOfCell = Math.ceil(image._width / rect._width);
      HnumOfCell = Math.ceil(image._height / rect._height);
      numOfCell = VnumOfCell * HnumOfCell;
      ohr = new Array();
      for (i = 1; i <= HnumOfCell; i++)
      {
      for (j = 1; j <= VnumOfCell; j++)
      {
      mc = screen.attachMovie("mask", counter, counter);
      mc._x = (j - 1) * rect._width + rect._width / 2;
      mc._y = (i - 1) * rect._height + rect._height / 2;
      ohr[counter] = counter;
      ++counter;
      mc.stop();

       

      } // end of for
      } // end of for
      screen.onEnterFrame = function ()
      {
      var _loc1 = this;
      if (numOfCell > 0)
      {
      _loc1[numOfCell].gotoAndPlay(2);
      --numOfCell;
      return;
      } // end if
      numOfCell = VnumOfCell * HnumOfCell;
      _loc1.onEnterFrame = function ()
      {
      var _loc1 = this;
      if (numOfCell > 0)
      {
      temp = random(numOfCell) + 1;
      _loc1[ohr[temp]].gotoAndPlay(12);
      ohr.splice(temp, 1);
      --numOfCell;
      return;
      } // end if
      delete _loc1.onEnterFrame;
      _loc1._parent._parent.gotoAndPlay(2);
      };
      };

       

       

      thanks