View Full Version : Passing Parms from Hyperlink to Flash.swf
Mtnclimbers
09-27-2004, 05:37 PM
I want to use Hyperlink to invoke a .swf and pass parms to it.
I am somewhat knowledge in HTML and Flash but I quess not enough to figure this out. Instead of Hyperlink, I could use flash buttons but still not do not know how to pass the parms to .swf.
you could pass it thru the querystring, or use the flashVars paremeter in your html object/embed tags.
Mtnclimbers
09-27-2004, 06:19 PM
How do I use hyperlink and object/embed tags?
This invoked the .swf file but I am not sure how to get the embed/tags included.
<a href="slide_show.swf">Photos
Sept 1 - 7, 2004</a>
The following is what I what to invoke and pass to slide_show.swf
<script language="JavaScript">
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write(' WIDTH="800" HEIGHT="657"');
document.write(' id="slideshow" ALIGN="center">');
document.write(' <PARAM NAME=movie VALUE="slide_show.swf">');
document.write(' <PARAM NAME=quality VALUE=best>');
document.write(' <PARAM NAME=salign VALUE=LT>');
document.write(' <PARAM NAME=scale VALUE=noscale>');
document.write(' <PARAM NAME=bgcolor VALUE=#FFFFFF>');
document.write(' <PARAM NAME=FlashVars VALUE="border=0x000000&delay=2&images=images/P2004245.jpg,images/P2004246.jpg,images/P2004247.jpg,images/P2004248.jpg,images/P2004249.jpg">');
document.write(' <EMBED src="slideshow.swf" quality=best scale=noscale salign=LT bgcolor=#FFFFFF ALIGN="center" NAME="slide_show"');
document.write(' WIDTH="800" HEIGHT="657"');
document.write(' FlashVars="border=0x000000&delay=2&images=images/P2004245.jpg,images/P2004246.jpg,images/P2004247.jpg,images/P2004248.jpg,images/P2004249.jpg"');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
document.write(' </EMBED></OBJECT>');
document.write(' ');
</script>
when you publish flash as html it will create a html page with <object> and <embed> tags. these are what embed the flash into your html page. with object you can use the <param> tag to add the flashvars element.
so you would have <object ......><param name="flashvars" value="myVariabeName=myvariablevalue">
</object>
<embed ..... flashvars="myvariablename=myvariablevalue"...>
something like that.... cant quite remember right now.
do a search on macromedias site for 'flashvars'.
osu9400
10-18-2005, 09:04 PM
Where did you find the slideshow flash util you are talking about? I would like to try it also.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.