homepage Welcome to WebmasterWorld Guest from 54.242.18.232
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
adding variables to flash
how to?
stever_nl




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

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) {
getURL("javascript:play('game.php?fid=halo&tld=com')");
}

if (_root.tld == xx or _root.tld == "") {
getURL("javascript:play('game.php?fid=new&tld=xx')");
}
}

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

Thanks!

Steve

 

winstun




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

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"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0"
ID=yourswf WIDTH=468 HEIGHT=300>
<PARAM NAME=movie VALUE="[red]http://yourdomian/yourswf.swf?tld=tld[/red]">
...
...
</OBJECT>

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!

winstun




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

double post

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved