• Hi,

    I have made a plugin that reads an external xml and uses its data to show info, loads a still image etc. I came across this problem, and can't figure it out if its a URL encoding error, security issue or something else.

    This works:

    Code
    <plugin 
    url="plugins/still.swf?req=somexml.xml"
    zorder="97" 
    align="center" x="0" y="0" 
    children="true" visible="false" cursor="false" handcursor="false" 
    />

    This doesn't (check the url, not a real adress btw)

    Code
    <plugin 
    url="plugins/still.swf?req=http://somewebsite.com/somexml.xml"
    zorder="97" 
    align="center" x="0" y="0" 
    children="true" visible="false" cursor="false" handcursor="false" 
    />

    This doesn't work either (it loads only the req and not var2, and if I turn them around, it loads var2 and not req)

    Code
    <plugin 
     url="plugins/still.swf?req=somexml.xml&var2=someothervariable"
     zorder="97" 
     align="center" x="0" y="0" 
     children="true" visible="false" cursor="false" handcursor="false" 
     />

    Flash tracer plugin doesn't give me any sandbox security errors or any other errors, krpano debugger says it can't find the file.
    Anyone got any clue?

    Btw I use this function in Flash, but Im almost 100% certain it's right and that the problem lies in the xml

    and crossdomain.xml, allowing all domains:

    Code
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*" secure="false"/>
    <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
    </cross-domain-policy>
  • Hi,

    I have tested this now,
    for me passing parameters (also urls) is working (online and offline)...

    did you use the Flex SDK (mxmlc) or Flash CS3 to build the plugin?
    try to trace ALL parameters, maybe this helps to find the problem...

    e.g - AS3:

    Code
    krpano.trace(0xFF,"enable debug mode");
    krpano.trace(0,"loaderInfo.parameters:");
    			
    var params:Object = loaderInfo.parameters;
    for (var varname:String in params)
    {
      krpano.trace(0,varname + "=" + params[varname]);
    }

    best regards,
    Klaus

  • I've pasted the piece of code, and swithed the krpano.trace with a normal trace(for some reason krpano.trace never worked). But it doesn't trace anything (using flash tracer addon). So I thought maybe it gets stucks along the way so I put 2 traces before and after the parameter trace. Like this:

    Code
    trace("begin trace")
    	var params:Object = loaderInfo.parameters;
    	for (var varname:String in params)
    	{  
    	  trace(varname + "=" + params[varname])
    	  //krpano.trace(0,varname + "=" + params[varname]);
    	}
    	trace("end trace")

    If I link to: url="plugins/still.swf?req=http://www.darkgfx.com/ObjectDetails2.xml"
    The trace output is completely empty (not even begin trace/end trace) and the still swf wont be loaded (not even interface stuff, is completely blanc)

    If I link it to url="plugins/still.swf?req=ObjectDetails2.xml", it loads the still and

    I get

    Quote


    begin trace
    req=ObjectDetails2.xml
    end trace

    I have no clue what so ever... It seems it's looking for a file called "still.swf?req=http://www.darkgfx.com/ObjectDetails2.xml" instead of still.swf with the req as parameter. Because the error krpano gives, is the same error you get when it cant find a picture.

    Edit: When I remove http:// from the req it works! url="still.swf?req=http://www.darkgfx.com/ObjectDetails2.xml"
    So I thought, ok it seems to deal with the / correctly, maybe it's the : I Url encode the all the slashes and : to

    Code
    http%3A%2F%2F

    and it works. Probally the : doesn't get encoded right?

  • Hi,

    which browser and flashplayer version are you using?
    I tested also passing a variable with "http://..." successfully

    krpano.trace(0, ... ); traces to the krpano log,
    but the first parameter means it is a debug message
    (see also in krpano_as3_interface.as)

    you could also write:
    krpano.trace(krpano_as3_interface.DEBUG, ... );

    but DEBUG messages are only shown, when the DEBUGMODE is enabled,
    either via <krpano ... debugmode="true"> in the XML
    or via - krpano.trace(0xFF,"enable debug mode"); in AS3

    do you have this example online?
    it would be interesting to test it, I have no idea why it shouldn't work...

    best regards,
    Klaus

  • What's the type of the first argument in krpano.trace(0xFF,"enable debug mode");
    The 2nd is a string, but im not sure of the first, seems a string to. It's for the dummy function Im trying to make so I don't get value is not a function error messages in flash ;p

    Edited once, last by Zephyr (March 2, 2009 at 4:54 PM).

Participate now!

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