get current hotspot name

  • Hi,

    when a code/action was called from a plugin or hotspot event (onclick,onloaded,onhover,...) then the attributes of this "caller" plugin/hotspot can be accessed direct,

    e.g.

    Code
    <plugin name="plugin1" ...
            onclick="trace(name);"
            />

    or

    Code
    <hotspots name="hotspot1" ...
              onclick="action(show_my_name);"
              />
    
    
    <action name="show_my_name">
        trace(name);
    </action>

    that will work also for all following calls, tweens, delayedcalls, ...

    best regards,
    Klaus

  • Hi,

    when a code/action was called from a plugin or hotspot event (onclick,onloaded,onhover,...) then the attributes of this "caller" plugin/hotspot can be accessed direct,

    Code
    <hotspots name="hotspot1" ...
              onclick="action(show_my_name);"
              />
    
    
    <action name="show_my_name">
        trace(name);
    </action>

    that will work also for all following calls, tweens, delayedcalls, ...

    Yup the example above works but I can't do nothing much with the variable.
    Consider this:

    When run it produces this output:

    Code
    INFO: mytest
    INFO: mytest
    INFO: %FIRSTXML%/assets/mytest.mp3
    INFO: %FIRSTXML%/assets/name.mp3
    ERROR: soundinterface - loading of "/pano/src/assets/name.mp3" failed

    I can't make sense of it.

  • Hi hitodenashi,

    Try using get() in line 8:

    SAlut.

Participate now!

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