6 Replies Latest reply on Jun 21, 2006 8:36 AM by blemmo

    trace = undefined

    krustafarian
      Hi... this is a script i'm using to duplicate a button for each item in a menu, each button is allocated a 'selectcText' variable (which is taken from an external txt file). (see attached code)
      on each frame of my _root. timeline i need to trace the next selectcText,
      e.g. on frame 9, i need to trace the selectcText allocated to button selectc1
      on frame 10, i need to trace the selectcText allocated to button selectc2
      on frame 11, i need to trace the selectcText allocated to button selectc3

      i've tried creating an array on the root...
      _root.myArray = new Array();
      and pushing the trace...
      _root.myArray.push(subMenuItem.selectcText)

      on my root, n = 0. and i've got a movieclip acting as a button to go to next frame and trace the correct text...

      onRelease = function () {
      var traceVar = _root.myArray[_root.n];
      trace(traceVar);
      _global.lastTrace = selectcText;
      _root.n++;
      _root.nextFrame();
      };

      i must be going about this all wrong, cos it just isnt working, my trace is undefined.
      pleeeeeeaaaaaaase help, been hacking away at this for months now...