5 Replies Latest reply on Feb 8, 2007 12:02 PM by kglad

    movie clip loader not picking up variable

    >Vee<
      Problem: I have a movie clip loader that does not pick up a variable I have set by a loop.
      Setup:
      frame 1: var btnVar:Number;
      frame 2:
      var lo = new Object();
      var loadingMessage:String = "Loading";
      lo.onLoadStart = function(target_mc:MovieClip) {
      KB_percent_txt.text = loadingMessage;
      trace("_root.btnVar: " + _root.btnVar);
      if (_root.btnVar == 0) {
      trace("s0");
      } else if (_root.btnVar == 1) {
      trace("s1");
      } else if (_root.btnVar == 2) {
      trace("s2");
      } else if (_root.btnVar == 3) {
      trace("s3");
      } else {
      trace("Err: btnVar for onLoadStart missing");
      }
      trace("Current btnVar is: " + _root.btnVar);
      };
      var mcl:MovieClipLoader = new MovieClipLoader();
      mcl.addListener(lo);
      frame 3:
      for (var i = 0; i < files_array.length; i++) {
      _root.btnVar = i;
      mcl.loadClip(files_root + files_array + ".swf", "_level" + i);
      trace(_root.btnVar);
      }
      stop();