2 Replies Latest reply on Nov 19, 2007 1:57 AM by Yochai Gani

    Array into list

    Yochai Gani
      I was wondering, if it is possible to pass Director Javascript array object to Director linear list?
      Are there any array search functions in Director Javascript similar to: getOne, findPos etc.?

      TIA

      Yochai Gani
        • 1. Re: Array into list
          Level 7
          > I was wondering, if it is possible to pass Director Javascript array object to
          > Director linear list?

          There is no #convert function like there is for transferring some data
          types between a Flash cast member and the Director host, so you'll have
          to write a function, in JavaScript, to do this.

          > Are there any array search functions in Director Javascript similar to:
          > getOne, findPos etc.?

          The various array functions are those provided by JS natively -
          Director's implementation of the SpiderMonkey engine doesn't add
          anything to the capabilitites of JS.
          • 2. Re: Array into list
            Yochai Gani Level 1
            Thanks Sean

            That was what I suspected of. Still, Javascript documentation is so faint and vague I have hoped there are some undocumented commands or features.

            In a project I’m doing I’m reading a text file, transform it into a list (array) and find a value in it (Locating streets by city name).

            Since I am a big fan of short and neat code, if I could just combine lingo and Javascript I could make the entire operation with 3 lines of code without using any loop!
            This could be done by using “split” and “getOne”.

            Still, it’s a pity, it would be really nice if it could work.

            Yochai Gani