1 Reply Latest reply on Jul 4, 2006 11:35 AM by

    How do you create sprite reference in javascript format?

      I am a flash developer who is new to director. I am using java script syntax. I have done a bit of looking around with no luck, I assume I am missing something obvious.

      I declare a global array and try to add sprite references to it. Basically like I used to do in ActionScript in Flash.

      _global.fieldArrayFindAName_G = new Array();

      _global.fieldArrayFindAName_G[0] = _movie.sprite["_txtDonorField0"];

      trace(_movie.sprite["_txtDonorField0"]); // Message window shows <(sprite 6)>
      trace(_global.fieldArrayFindAName_G[0]); // Message window shows <(sprite 6)>

      // Crash here --> script error property not found #text
      //
      _global.fieldArrayFindAName_G[varLoop].text = "";

      Any guidance would be greatly appreciated.

      TIA

      Tim