Character encoding in paths

  • I'm trying to embed KRPano using SWFObject, and passing the Sphere and Preview filename via a JS parameter.

    I'm trying to generate correctly sized images and previews using phpThumb, but it uses some URL parameters to pass details to the resizing script, e.g.


    However when I try and pass this in via SWFObject, some of the parameters seem to be stripped off. Is there any documentation about what characters KRPano doesn't like? I think the equal sign is being removed. Even URL encoding the params don't seem to work. Any ideas?

  • Here's the code:

    swfobject.embedSWF("krpano.swf", "pano",  "960", "480", "9.0.28",  "swfobject/expressInstall.swf", 
                                {pano:"krpano.xml", sphere:"/assets/util/phpThumb/phpThumb.php/4000x2000;/assets/images/equi/towers-10.jpg", "preview.url":"/assets/util/phpThumb/phpThumb.php/q=25;fltr[]=gray;fltr[]=blur|10;1000x500;/assets/images/equi/towers-10.jpg"}, 
                                {allowfullscreen:true, bgcolor:"#ffffff", allowscriptaccess: 'sameDomain'}, 
                                {id:'pano', name:'pano'});

    The default format for passing params to PHP thumb (standard GET params) doesn't work - this alternative format does work for the sphere, but it is the = character that is causing problems. KRPano seems to truncate the preview URL at the first = so it actually tries to call:


    Encoding the = doesn't seem to help.

  • Hi,

    interessting, but it's not krpano that truncates the string, I think the way how the parameters will be passed to the flash is the problem,

    the swfobject script generates finally something like that to pass the variables to flash:

    <param name="flashvars" value="sphere=...&preview.url=...">

    and there a '=' will cause a problem,
    a way of encoding should help, but I don't know yet, what way... (I will try to find out)

    best regards,

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!