Page 1 of 1

[SOLVED] (SSP and) SWF OBJECT and dynamically asigning flashvars

Posted: Thu Mar 19, 2009 7:58 am
by size
HI I am trying to use SSP(slideshowpro.net)and SWF object and dynamically change the "flashvars.xmlfile" . the code below is in the head. I would like to be able to enter the xml file path in the "Edit Content" page by inserting a content block in the template i.e"{content block="xmlfile" oneline="true" wysiwyg="false"}"), and then feed the value into the flashvars.xmlfile = "xml/property.xml"; however since the script is in {literal}{/literal} it is not possible.

can anyone point me in the right direction on how to do this? thanks

{literal}

var flashvars = {};
flashvars.xmlfile = "xml/property.xml";  ****THIS NEEDS TO CHANGE*****
var params = {};
params.allowfullscreen = "true";
params.wmode = "transparent";
var attributes = {};
swfobject.embedSWF("swf/hn_property.swf", "property", "700", "435", "9.0.0", "swf/expressInstall.swf", flashvars, params, attributes);

{/literal}

ps, i have tried not using the {literal) tag and also turning the {literal} tag "off" and the back "on" with no success

Re: (SSP and) SWF OBJECT and dynamically asigning flashvars

Posted: Thu Mar 19, 2009 4:04 pm
by JeremyBASS
try



Code: Select all


{literal}
<__script__ type="text/javascript">
         var flashvars = {};
         flashvars.xmlfile = "{/literal}
{content block="xmlfile" oneline="true" wysiwyg="false"}{literal}";  ****THIS NEEDS TO CHANGE***** 
         var params = {};
         params.allowfullscreen = "true";
         params.wmode = "transparent";
         var attributes = {};
         swfobject.embedSWF("swf/hn_property.swf", "property", "700", "435", "9.0.0", "swf/expressInstall.swf", flashvars, params, attributes);      
</__script>
{/literal}



also this is not the right place for the topic... hope this helps

cheers
jeremyBass

Re: (SSP and) SWF OBJECT and dynamically asigning flashvars

Posted: Sat Mar 21, 2009 8:07 am
by size
thanks Jeremy, thats what I meant when I said>> turn{literal} tag "off" and the back "on" with no success

but for some reason it now works! awesome. are also using SSP director to manage the photos and feeding the director URL instead of an XML feed. just in case someone else wants to do this thought I mention it.

where should I be posting this sort of question?

Re: (SSP and) SWF OBJECT and dynamically asigning flashvars

Posted: Sat Mar 21, 2009 8:30 am
by JeremyBASS
um products I do belive... glad you got it going... don't for get to mark it solved..

cheers
jeremyBass