the addhotspot action - Please Help

  • I am currently working on a HUGE tour and any automation would help greatly.

    I have made an action that creates a hot spot so I can use it to make me several hot spots at once. the only variables I have here are ath and atv, I will be putting more in (onclick and whatnot) I made it simple for this post.

    <action name="createhotspot">
    addhotspot(%1);
    set(hotspot[%1].ath,%1);
    set(hotspot[%1].atv,%2);
    set(hotspot[%1].url,button.swf);
    </action>

    The problem is that whenever I make a call with several hotspots it only makes the first one!

    <action name="onstart">
    action(createhotspot,0,0);
    action(createhotspot,90,0);
    action(createhotspot,-180,0);
    </action>

    I'd really like some help with this, I have no idea what to try and I am on a deadline

    Thank you

  • Hi,

    an unique name for each hotspot must be set,
    e.g. use the % placeholders as follow:
    %1 = name
    %2 = ath
    %3 = atv

    Code
    <action name="createhotspot">
      addhotspot(%1);
      set(hotspot[%1].ath,%2);
      set(hotspot[%1].atv,%3);
      set(hotspot[%1].url,button.swf);
    </action>

    and

    Code
    <action name="onstart">
      action(createhotspot,spot1,0,0);
      action(createhotspot,spot2,90,0);
      action(createhotspot,spot3,-180,0);
    </action>

    note - since version 1.0.8 beta 8 an action can now also be called "direct" without "action()",
    e.g.

    Code
    <action name="onstart">
      createhotspot(spot1,0,0);
      createhotspot(spot2,90,0);
      createhotspot(spot3,-180,0);
    </action>

    best regards,
    Klaus

  • I have to second that. SWEET! The only problem I have with this great product is just when I get my template set the way I want it, Klaus adds new features or explains the current ones in a simpler way so my brain can deal with it. I can't stop myself from always adjusting my template. One day Klaus will have to run out of creative ideas but I guess that is what this forum is for: combining our wishes with his amazing programming skills.

    Thanks,

    jarredja

Participate now!

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