0 Replies Latest reply on Oct 21, 2006 11:30 AM by vncntj

    attaching values to menu buttons

    vncntj
      I'm loading menu buttons, that will load an external text file. My approach was to attach the button with the name of it's text file that it will load and just pass that name to the function


      I'm loading menu buttons, that will load an external text file. My approach was to attach the button with the name of it's text file that it will load and just pass that name to the function


      [CODE]var i:Number = 0;
      function menuIt() {
      if (i<=8) {
      //trying to attach the Movie and give it the name 1.txt
      var doo:MovieClip = attachMovie("mc_menu", i+".txt", 50);
      new mx.transitions.Tween(doo, "_x", mx.transitions.easing.Strong.easeIn, 0, 30, 1, true);
      doo._y = 30;
      i++;
      }
      doo.onPress = function() {
      var variables_lv:LoadVars = new LoadVars();
      trace(doo);
      // trying to pass that name to at this point.
      // the text files will be name 1.txt, 2.txt, 3.txt..
      // and eight menu buttons will be used.
      variables_lv.load("doo");
      variables_lv.onData = function(data) {
      _level0.mctext.myTxt.text = data;
      var aoo:MovieClip = attachMovie("mc_arrows", "arrows", 1001);
      aoo._x = 620;
      aoo._y = 30;
      };
      };
      }[/CODE]