[SWFObject] Initializing variable
Javier de Alfonso
javierdealfonso at vocesenlared.com
Tue May 2 18:46:26 PDT 2006
Hello, I need to set a variable called "vol" (volume) to 100 when first
entering our homepage, and then allowing the visitor to change it with a
slider, so I need to pass its value from page to page. (The web is made from
several html pages with one flash in each).
Before the EOLAS issue I used the following html code in every page to get
variables from the url:
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(
'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n'+
' codebase="
<http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version
=6,0,29,0>
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=
6,0,29,0" width="975" height="580" ID="inquiero">\n'+
' <param name=movie VALUE="index.swf'+document.location.search+'">\n'+
' <param name=quality VALUE=best>\n'+
' <param name=wmode VALUE=transparent>\n'+
' <embed src="index.swf'+document.location.search+'"\n'+
' quality=best wmode=transparent width="975" height="580"
align="absmiddle"\n'+
' type="application/x-shockwave-flash"\n'+
' pluginspage="
<http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Shoc
kwaveFlash>
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Shock
waveFlash"></embed>\n'+
'</OBJECT>');
//-->
</SCRIPT>
and the following AS inside the flash:
if (vol==null) {vol=100};
So when first entering any page the value of "vol" was set to 100 if it
wasn't passed from the url.
How should I use Geoff's SWFObject to achieve the same?
I tried on every html:
so.addVariable("vol", getQueryParamValue ("vol"));
and inside every flash:
if (vol==null) {vol=100};
But "vol" always sets to 0.
Could you give a hand here? Thank you in advance.
Javier.
Madrid. Spain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060503/a97b7dce/attachment-0004.htm>
More information about the Swfobject
mailing list