Forum Moderators: phranque

Message Too Old, No Replies

Flash and Query Strings

         

panic

7:08 pm on Jul 9, 2003 (gmt 0)

10+ Year Member



I have a client who has a site designed 100% in Flash. They want to be able to send the user directly to the product in the SWF file via a query string. For example, domain.com/file.swf?product=widgets .

Is this possible? If so, how would I go about doing it?

-panic

jeremy goodrich

7:11 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Keeping in mind I'm not an expert on flash or actionscript:

Use a server side redirect to catch & parse the query string you would like to hand off to the flash swf file.

Then, the server side script (could be Perl, Php, Asp, or Jsp they will all work afaik) pass the variable to the actionscript in the swf file.

Long while back, I had a perl script pass some data back & forth between a database & a flash movie -> everything worked out fine. I know of no direct way to pass a query string to a flash movie, but perhaps somebody better at actionscript can let you know how it's done?

broniusm

7:34 pm on Jul 9, 2003 (gmt 0)

10+ Year Member



I believe Flash directly supports querystring; no need for serverside trickery.

jeremy goodrich

7:36 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It would be actionscript then.

I stand corrected on what I said above, the server side stuff was for the database interaction - it isn't needed to simply fetch a url parameter into an swf file.

panic

10:26 pm on Jul 9, 2003 (gmt 0)

10+ Year Member



Thanks guys :D