Tricky XML include idea not working...

  • Hi,

    I would like to include an XML file that is not embedded from one that is. What I want to do is leave the map xml exposed so the client can add their Google Map API key.

    embedded:

    Code
    main.xml ...<include url="map.xml" />...


    external:

    Code
    map.xml ...<plugin name="map"key="Endter your Google Maps API Key HERE!" ... >...</plugin>


    But I'm not having much luck. I have not tried using full paths, since that would not work for my situation. I just wanted to ask if this is a setup someone has solved before I keep experimenting.

    Not sure if this is a viable solution (I assume this would be equivalent to replacing the current XML rather than 'including') but I also tried adding doing a "krpano.loadxml(MapXML);" from a plugin swf but I get an error with that...
    Error: Call to a possibly undefined method loadxml through a reference with static type krpano_as3_interface.


    Any guidance or ideas would be greatly appreciated.

    Thanks in advance!

    2 Mal editiert, zuletzt von wheller (11. August 2010 um 23:37)

  • Hi,

    yes, that should work,
    just make your project as you want it and then when building the swf with the kprotect remove the specific xml file from the embedded files list, it will be loaded the normal way,

    internally krpano loading works like that:
    1. first it looks up if there is an embedded file with the path/name
    2. if not it tries to load the file the normal way

    best regards,
    Klaus

  • Excellent, I got it working. Not sure what I did wrong the first time but I rebuilt the protected file and it worked perfectly.

    Thank you for confirming I was on the right track, knowing I'm not going down the wrong path completely makes it much easier to experiment with different setups.

    This is the first time I've used kprotect, and like all your other tools it's excellent.

    -Bill

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!