embed xml code into plugin

  • yeah, just load it as a string

    Code
    var krpanoxml:String = "<krpano>more krpano code</krpano>";
    krpano.call("loadxml("+escape(krpanoxml)+")");

    the string should be escaped though. So use escape(krpanoxml).

    Edit:
    Sorry I missunderstood. You want to load a normal xml intoo a custom plugin, and read the xml, and fire functions accordingly? thats a different subject (and not much to do with krpano). I would normally define the action in the xml

    <somexml> <customplugin onclick="trace('test')" /></somexml>

    in your plugin, you load the xml and read out the onclick attribute, and then wrap a krpano.call around it. Else you can use this[valuefromxml]() where valuefromxml is the string thats stored in the onclick (xml)

    2 Mal editiert, zuletzt von Zephyr (5. Juli 2011 um 16:39)

Jetzt mitmachen!

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