2 Replies Latest reply on Feb 17, 2012 12:42 PM by kglad

    [help] calling strings in 3-dimensional array

    dreamlog

      Here's the bare bones of what's causing me a problem:


          var txt:Array = [mtxt];

          var mtxt:Array = [stxt];
          var stxt:Array = ["test string"];

       

          trace(txt[0][0][0]);

       

      I expect the output to be:

       

          test string


      But instead I get a 1009 error.


      I want to be able to do something like this:


          var m:int = 0;

          var s:int = 0;


          var txt:Array = [mtxt];

          var mtxt:Array = [stxt];
           var stxt:Array = ["test string"];

          trace(txt[m][s][0]);

       

      And get in my output:

       

          test string