callwhen mousedown

  • Hello

    I have some onmousedown events set up in krpano tag but from time to time I need specific actions for the next mousedown, only the next, not any other ones.
    I thought of using

    Code
    callwhen(event.mousedown(), myAcion());


    It doesn't seem to work.
    Am I missing something?

    Thanks

  • Hi,

    that's not possible, you would need to add another event...

    Here a helper action for dynamically adding an one-time event:

    Code
    <action name="onnextevent">
      delayedcall(0,
        calc(eventname, 'event' + events.count + (timertick BOR 0));
        set(events[get(eventname)].keep, true);
        txtadd(events[get(eventname)].%1, 'events.removearrayitem(', get(eventname), ');', "%2");
      );
    </action>


    Usage:

    Code
    onnextevent('onmousedown', trace(next mousedown); );

    Best regards,
    Klaus

Jetzt mitmachen!

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