Helpful Information
 
 
Category: Flash Help
url strings to flash

can you pass variables to .swf files through a query string embedded in a URL when you embed the media in the html.? for example here's where i embed my .swf:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,
<param name=movie value="reloader.swf?topicId=3&foumId=2">
<param name=quality value=high><param name="LOOP" value="false">
<embed src="reloader.swf?topicId=3&foumId=2" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ty...>
</embed>
</object>

as you can see i'm trying to pass topicId and forumId like this "reloader.swf?topicId=3&foumId=2"

this would be super cool. thanks
-alligator.

Yes, you certainly can. And it is indeed super cool. Just declare your variables in the flash movie and they will be loaded from the source URL as in your example.

I am having real trouble with this!!

I am designing a flash banner ad and the URL that a button opens needs to change for different affiliates.

I have the following HTML in a page to embed the banner and the clickTag variable is defined in the URL. My problem is setting the URL in Flash for the button.


<embed src="flash/no_code_468_60_flash_01.swf?clickTag=http://www.zencudo.co.uk" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="468" height="60"

The code I am using for the button is...

on (release) {
getURL(clickTag, "_blank");
}


Will this get the clickTag variable from the URL?? If not, how do I define the variable? I tried writing it as the following but didn't work either!!

on (release) {
clickTag;
getURL(clickTag, "_blank");
}

Any help would be much appreciated!! :-)

Looks like you've done it right? I've done a quick mock up of the sort of thing you're after here (http://www.dansmith.info/content.asp?ID=48) and that version all works ok anyway. Have a look at that one and see if it's any different from yours.

Cheers,

-Dan-










privacy (GDPR)