PDA

View Full Version : Problem passing param to external swf !!


Ag_Smith
10-16-2007, 11:27 AM
hey all
I have a problem with this code:

<view name="b_mc">
<attribute name="height" value="300"/>
<attribute name="width" value="260"/>
<handler name="oninit">
This.setSource('http://romahome.no-ip.org/lps-4.0.6/my-apps/XSPF.swf?action=play&playlist=http://romahome.no-ip.org/lps-4.0.6/my-apps/playlist.xml&folder=http://romahome.no-ip.org/lps-4.0.6/my-apps/&textcolor=033066&color=E6E9FB&loop=no&lma=yes' )
</handler>
</view>


it load
http://romahome.no-ip.org/lps-4.0.6/my-apps/XSPF.swf

but not pass param like this...
&playlist=http://romahome.no-ip.org/lps-4.0.6/my-apps/playlist.xml
&folder=http://romahome.no-ip.org/lps-4.0.6/my-apps/


& is equal to & but is needed by laszlo compiler to escape '&' in url

if I use the same string in html embedding it work fine ...

how to fix ?

trucker_
10-16-2007, 11:36 AM
replace the & with &amp;
<handler name="oninit">
This.setSource('http://romahome.no-ip.org/lps-4.0.6/my-apps/XSPF.swf?action=play&amp;playlist=http://romahome.no-ip.org/lps-4.0.6/my-apps/playlist.xml&amp;folder=http://romahome.no-ip.org/lps-4.0.6/my-apps/&amp;textcolor=033066&amp;color=E6E9FB&amp;loop=no&amp;lma=yes' )
</handler>

Ag_Smith
10-16-2007, 11:42 AM
replace the & with &amp;
<handler name="oninit">
This.setSource('http://romahome.no-ip.org/lps-4.0.6/my-apps/XSPF.swf?action=play&amp;playlist=http://romahome.no-ip.org/lps-4.0.6/my-apps/playlist.xml&amp;folder=http://romahome.no-ip.org/lps-4.0.6/my-apps/&amp;textcolor=033066&amp;color=E6E9FB&amp;loop=no&amp;lma=yes' )
</handler>

I obtain the same problem...
because in my url '&' was already escaped with '&_#_3_8_;' (without '_') The forum auto-replaced '&_#_3_8_;' with '&'

but anyway i tried your solution and I obtain the same problem...