• job1 add this to each plugin you want to disappear.

    tag="thumb"

    then run this action and it will work. removing_plugins(tag,thumb);

    it will loop through every single plugin on the stage and only remvoe the ones with tag="thumb" i tag almost all my plugins now use this code it kind allows you to trun groups of things on and off at the same time.

  • Hi all, and Klaus

    I try to remove plugin by lot, but it's doesn't work

    eg I want to remove all the plugin photo_0, 1,2,3,4 etc..
    but removeplugin(thumb_1%) not working only removeplugin(1%) works but all the plugin gone


    Try %1 in place of 1% !!!

    In my "engine" I use a similar code

    <action name="removethumbplugin">
    if(plugin[m%1t%2].created,
    removeplugin(m%1b%2);
    removeplugin(m%1t%2);
    );
    </action>

  • job1 add this to each plugin you want to disappear.

    tag="thumb"

    then run this action and it will work. removing_plugins(tag,thumb);

    it will loop through every single plugin on the stage and only remvoe the ones with tag="thumb" i tag almost all my plugins now use this code it kind allows you to trun groups of things on and off at the same time.

    or you upgrade it to 1.14 :D

    Code
    for(set(i, plugin.count), i GE 0, sub(i), 
        if(plugin[get(i)].%2 == %3,
                 removeplugin(get(i));
          );
    );


    Great tip about the tagging. I used to put certain strings before the the pluginname (like thumb_1, photo_1) Now Im definitely use this. Alsoo never knew that plugin[].%2 works. Thanks! Although I reckon this would be slow if you have lots of plugins (since you have to iterate m all).

  • @ VN2011 YESSSSSS ! ! it works like I want

    @ jpdeglet69 sorry but not works

    many thanks all *thumbsup*

    Because I fixe a specific attribute "created" during creation
    ...
    set(plugin[m%1b%2].created, true);
    set(plugin[m%1t%2].created, true);
    ...
    And during deletion I test this attribute
    ...
    if(plugin[m%1t%2].created,
    removeplugin(m%1b%2);
    removeplugin(m%1t%2););
    ...

  • does that work?

    m%1t%2?

    wouldnt you need to do txtadd(tmpvar, m, %1, t, %2) ?

    All my tours us the same main "XML engine" which read xml "data" files
    where are defined all parameters for the active tour.

    So this part of code, included in an action and in a loop,
    creates dynamically all spots on the map (created also dynamically) of the active tour.

    because for different tours I manage different maps with different number of spots...

    So, it's running well, for sure... *rolleyes*

  • Hehe what I ment is, does this code (syntax) work for krpano?

    I use similar systems where all the actions are same, but the data array you give them, is different. Thats how I can "generate" menu's, maps, galleries, hotspots.

    <panoramas>
    <pano name="" title="a nice location" maphotspot_x="10" category="landscapes" music="music.mp3" ref="loc1" />
    etc

    and then I just do a for loop, generating all the hotspots, maps, titles, menus etc based on this information. And use a tracking system, which remembers which location is active, and updates the rights title, hotspot, maphotspot, category.

    but normally to generate a plugin, I use txtadd(aplugin, plugin_, %1); addplugin(aplugin); But if your syntax works, I could skip that step.

Participate now!

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