3 Replies Latest reply on Sep 18, 2007 7:12 AM by Vp6er

    Using URL encoded variables

    Vp6er
      Hi,

      I'm trying to create an array from text contained within an external file. In the external file are multiple variable names. I am passing the variable name to be turned into an array using a query string (based on the directory name). From my page source, I can see the correct string is being passed to the swf file.

      Previously, I had the variable name hardcoded in the external file ie: myAr1=this.myAd1.split("|"); , myAr2=this.myAd2.split("|"); etc. External variable names being myAd1, myAd2.

      I now want to have the external variable name taken from the URL query string 'myAdvertiser'

      My html page source shows the passing of this variable name to be correct: <param name="movie" value="/sync/directory/flashtest2/flash/glist_acid_version_myAdvertiser.swf?myAdvertiser= flashtest2" />

      and

      <embed height="404" pluginspage=" http://www.macromedia.com/go/getflashplayer" src="/sync/directory/flashtest2/flash/glist_acid_version_myAdvertiser.swf?myAdvertiser=fl ashtest2" type="application/x-shockwave-flash" width="800" quality="best" play="true"></embed>

      So far so good...

      The problem seems to arise when splitting the text into the array.

      myAr1=this.myAdvertiser.split("|");

      I think that the swf is attempting to find an actual variable in the text file called 'myAdvertiser' rather than using the information passed already from the query string ie myAdvertiser=flashtest2

      So my question is, how do I construct the array code to make use of the query string?