Groups | Blog | Home
all groups > flash data integration > january 2005 >

flash data integration : Flash variable from HTML link


Chrononaut
1/13/2005 2:15:01 AM
I've read how to do this before, but can't find it now... I need to pass a
variable from a URL to set the destination of my flash movie. I thought I
could set the variable like:

www.homepage.com?variable=value

but when I run the homepage.htm file, the variable in the flash movie isn't
set. Do I need to somehow loadVar from within the Flash movie knowing I'll be
receiving data from the URL?

Thanks,
Kris
derobinson
1/14/2005 3:23:52 AM
You have to take the URL variable and pass it to the Flash movie. If you're
using CF or something like it, then its easy to reference the URL varible and
print it out in either a param tag when you're calling the Flash movie or
simply pass it as a new URL variable to the Flash
movie...mySWF.swf?variable=value. Either way, the variable will be available
scoped at _root in the Flash movie.

If you're not using some sort of middleware, then I've seen Javascript that
you can use to parse the URL of a webpage out and get the variable to print out
in the same manner as above to pass into the movie, but I in the few tests I
did, it wasn't really that compatible across browsers.

Hope this helps!

Chrononaut
1/18/2005 7:28:19 PM
Thanks, I'll take a look!

AddThis Social Bookmark Button