Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

adding variables to flash

how to?



7:39 am on Jun 9, 2004 (gmt 0)

10+ Year Member

Hi y'all!

I want to pass a variable from an url into my flashmovie so it gives the right content.

My situation:

I have the url www.mysite.com/?tld=com

in the FLA movie I have embedded:

on (release) {
if (_root.tld == com) {

if (_root.tld == xx or _root.tld == "") {

But this does not work. Am I missing something, should I add some more code or is it totally wrong?




12:22 pm on Jun 9, 2004 (gmt 0)

10+ Year Member

I think what you may want to try is, as well as passing the variable in the html header, you'd want to put something like this in your object or embed tag for the .swf -

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
ID=yourswf WIDTH=468 HEIGHT=300>
<PARAM NAME=movie VALUE="[red]http://yourdomian/yourswf.swf?tld=tld[/red]">

Flash needs to be passed that variable directly when your browser calls for the movie to be loaded. It cannot grab something from the header string without it being called explicitly.

Hope this helps you out.
And welcome to Webmaster World!


1:02 pm on Jun 9, 2004 (gmt 0)

10+ Year Member

double post

Featured Threads

Hot Threads This Week

Hot Threads This Month