Skip to main content
Inspiring
April 27, 2008
Question

URL variables passing into flsah

  • April 27, 2008
  • 3 replies
  • 431 views
Hello,

I have URL variables that I need to call into flash. How do I bring them in without calling a script again?

Essentially, I'm time-stamping a text file that holds all my variables. This timestamp is held in a URL variable that loads the embedded swf. This embedded swf needs to call up the text file that contains all the other variables that are being used to populate dynamic fields with the swf. How do I grab the variable that is contained in the original html page that is embedding this swf?

I have had no problems loading URL variables by loading an external script or by loading an external text file. But the html page that is embedding my swf holds the variables that I need to use inside the swf on the URL.

your help is greatly appreciated..

thanks,,
This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
April 28, 2008
that looks like you're opening an html file.

if so, you have a few options:

1. add your query string to your embed code. (how you do this depends on your embed code, but this uses flashvars.)

2. use javascript to parse that url and pass the variable/value back to flash.

if you're calling a swf, myvariable is ready for use from you swf's main timeline using your swf's contentLoader().

if you're calling a server-side script your variable/value is available to your script.
yellowDevAuthor
Inspiring
April 27, 2008
I have my variables in the "query string of the url"

ex... www.mydomain.com?myvariable=variable
kglad
Community Expert
Community Expert
April 27, 2008
explicitly explain how/where the html page that embeds your swf, holds your variables?