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

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
size
New Member
New Member
Posts: 9
Joined: Sat May 19, 2007 8:29 am

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

Post 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
Last edited by size on Sun Mar 22, 2009 3:31 am, edited 1 time in total.
JeremyBASS

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

Post 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
size
New Member
New Member
Posts: 9
Joined: Sat May 19, 2007 8:29 am

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

Post 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?
JeremyBASS

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

Post by JeremyBASS »

um products I do belive... glad you got it going... don't for get to mark it solved..

cheers
jeremyBass
Post Reply

Return to “Developers Discussion”