handle special chars
in javascript so.addVariable("xmlPath", escape('...'));test the presence of the flashvar then assign default is not set in actionscript: var xmlPath:String = (_root.xmlPath) ? _root.xmlPath : '...'; - S 2009/12/8 Julo <[email protected]> > Hi, > > I've created a little slideshow swf that gets XML content from a PHP > file. (Effectively, the PHP reads a folder, generates the XML, that > the Flash reads) > > This works OK, but it stops working when I try to make it more > flexible and try to pass the path of the folder to the PHP file by > using a query string. > > (I am using swfobject 1.X, as my site is using Silverstripe and I seem > to be having some issues with swfobject 2.x) > > In my HTML file (in the swfobject script block) I have: > > so.addVariable("xmlPath", "http://localhost/silverstripe/mysite/code/ > getimages.php?imgfolder=../../assets/images/Homepage/<http://localhost/silverstripe/mysite/code/%0Agetimages.php?imgfolder=../../assets/images/Homepage/> > " > > > In the Flash file I have the Actionscript: > > // if there is no externally defined XML file path > if (xmlPath == undefined) { > var xmlPath : String = "http://localhost/silverstripe/mysite/code/ > getimages.php?imgfolder=../../assets/images/Homepage/<http://localhost/silverstripe/mysite/code/%0Agetimages.php?imgfolder=../../assets/images/Homepage/> > "; > } > > What's odd is that if I comment out the "so.addVariable("xmlPath", > etc." line in my HTML, it all works fine and the slideshow is > displayed perfectly. > If I try to put the same value in my flashvar as I have as default > value in my Actionscript, it stops working. > > Can anyone help solve this mystery please? > > JuLo > > -- > > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
