Loading plug-ins after the panorama images

  • Hi!

    I have a problem: the pano is a have many plugins (images plugins, animation), so long time to load pano images.

    Question: How to make the first loaded the panorama images, and after then plugins images ?

    Sorry for my english))

  • You'll end up with other problems (pano being loaded by people cant click plugin because its not loaded yet).

    but you have an event called onloadcomplete. In that you can call a command that build up all the plugins. Add all the plugins like normal, but keep the url empty. In the onloadcomplete action you setup all those urls. Its a bit of work. Better would be making a tiny swf plugin. That you active onclick. Then the tiny swf plugin would load the assets externally.

    Code
    <events onloadcomplete="build_plugins()" />
    
    
    <action name="build_plugins" >
       set(plugin[plugin_1].url, theswf.swf);
      etc
    </action>
  • or you can add plugins with krpano

    Code
    <events onloadcomplete="build_plugins()" />  
    
    
    <action name="build_plugins" >    
    addplugin(plugin1);
    set(plugin[plugin1].url, theswf.swf);
    ...
    set(plugin[plugin1].keep, true);
    </action>

    Yes but then you have to set 10+ attributes per plugin, leading in 1 big action where errors could occur. It would be easier to make empty plugins like:

    <plugin name="plugin_1" x="10" y="20" align="center" parent="STAGE" etc etc />

    and then set the url dynamicly for plugin_1.

Participate now!

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