2 Replies Latest reply on Jun 3, 2008 12:49 PM by extravaganza_

    Loading Array?

      I have found a script that allows me to create a scrolling photo gallery for my site. The actionscript code that you modify yourself has an array and you can just change the names of the pictures to match your own to pull pictures into the movie. The array is the picture names enclosed in quotation marks and separated by commas.

      I would love to load this info dynamically. I have a php page that pulls all the pictures in a directory and publishes those. http://www.stacybuckley.com/vars/pics.php

      There are various ways (maybe not the best) that I can import this data into flash but the quotation marks come out encoded and I can't seem to "un*escape" them.
      I could leave the quotation marks out of my php page, but then when I reference the array position it doesn't see it as a string and the script doesn't work.

        • 1. Re: Loading Array?
          clbeech Level 3
          i don't see the loading method for the php doc in this code - however you should be able to leave out the quotes and they should come in as a string. If you are trying to pass this as an array, that may also be part of the problem. you'd need to pass it as a concatenated string and then use split at the commas on loading and push them into the array, then they should come in as strings.
          • 2. Re: Loading Array?
            extravaganza_ Level 1
            I wasn't sure what the best way to load the data would be. Here is revised code with LoadVars at beginning. I guess I have trouble turning this into the simple array "pic1", "pic2." that was in the original file How would I conctatenate it to match this format? Thanks so much