using plugin from main XML inside another XML

  • Hi! I'm trying to call a function from a plugin in my xml.
    And everything works OK for the main xml (where the plugin is declared), but when I load another XML (with loadpano), then I can not call the plugin methods from that XML.
    This is the way I'm doing it:

    Zitat
    Code
    <plugin name="navegacion" url="%SWFPATH%/Navegacion.swf" keep="true" />

    and I'm calling the methods in this way:


    Code
    plugin[navegacion].addpanorama();

    That works fine in the main.xml, but in any other xml loaded with loadpano:

    Code
    <action name="load_map_pano">
    		loadpano('%CURRENTXML%/%1', null, MERGE, BLEND(1));
    	</action>

    It says:

    Zitat

    WARNING: unknown action command: plugin[navegacion].addpanorama

    Is possible to continue using inside any loaded xml a plugin loaded in the main.xml?

    Thanks !
    Enrique.

  • Can you post an example, amybe that help me to see if I'm doing somehing wrong...

    For example, I found that if I use:

    Code
    <plugin name="navegacion" url="%SWFPATH%/Navegacion.swf" keep="true" />
    <events onxmlcomplete="action(xmlcomplete);" />
    <action name="xmlcomplete">
                	startplugin();
    </action>
    <action name="startplugin"> 
    			plugin[navegacion].addpanoramas();
    </action>

    It doesn't work because in xmlcomplete the plugins seems not be ready yet.

    I must to do in this way:

    Code
    <action name="xmlcomplete">
                	delayedcall(2, startplugin() );
    </action>

    But if I'm not defining the plugin inside the same xml, and I have:

    Code
    <plugin name="navegacion" url="%SWFPATH%/Navegacion.swf" keep="true" />


    inside the main.xml the I can't use plugin[navegacion].addpanoramas(); even after the delayed call.

Jetzt mitmachen!

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