5 Replies Latest reply on Mar 28, 2007 1:01 PM by kglad

    Timing between a textfield and a MC

    Blackard84
      ok... the coding works, the text comes in the right color, right size.. everything like that.

      Only one problem.

      My text field reveals the number BEFORE the movieclip behind it is even started. Where's the suspense?

      So pretty much what I'm asking, is how do I make it that the movieclip starts playing, but the text field doesn't show up until AFTER the movie clip is done?

      Thanks in advance

      quote:

      stop();
      BgStr_mc.onLoad = function() {
      var x = Stage.width/2;
      var y = Stage.height/2;
      var txt:TextField = this.createTextField("txt", this.getNextHighestDepth(), this._width/2, this._height/2, 200, 50);
      var fmt:TextFormat = new TextFormat();
      fmt.color = 255;
      fmt.font = "Verdana";
      fmt.size = 24;
      rnd = Math.round(Math.random()*(block.length+1));
      if (block[rnd]<0) {
      var temp = Math.round(block[rnd]*amount);
      txt.text = temp;
      amount += temp;
      } else {
      if (block[rnd] == 0) {
      amt.text = "0";
      txt.text = "Bankrupt";
      nextFrame();
      } else {
      amount += block[rnd];
      txt.text = block[rnd];
      }
      }
      txt.setTextFormat(fmt);
      if (amount>max) {
      amount = max;
      }
      if (amount<0) {
      amount = 0;
      this.gotoAndPlay(9);
      }
      block.splice(rnd, 1);
      amt.text = amount;
      BgStr_mc._x = x;
      BgStr_mc._y = y;
      this.gotoAndPlay(7);
      };
      BgStr_mc.onRelease = function() {
      gotoAndStop(7);
      };



      I'm not sure if the code I have will help you solve this, given that I have no idea how to implement this pause, but just in case :)