How to trace the clicked object? [solved by Umalo]

  • Hi, please I need help with this idea:


    For testing project I want to get the name of any clicked object (layer/hotspot) in the stage. I thought in a code as: to click any object, open console, show it name...

    <events on onmouseup="showlog();trace('the clicked object is ",get(name));/>

    The above code isnot correct because the get is for previous coded object, but it is only for give idea...

    Maybe to put dinamically a code to all object with for set(i,0), i LT layer.count.... trace(get(name)).... then after when is clicked show the name y remove dinamically this code to original state....

    Any idea?

    Best Regards,

    Fernando

  • Thanks Umalo, the solution for me looks like your example. Hover instead click is perfect and the combobox for switching is ok too.

    In the example, the layer with hotspot/layer name flicks. First it is visible but it turns to no visible in very few time. But the idea was shown.

    In order to avoid conflict with previous hover property of the objects (hotspot/layer), this property should be overwritten temporaly (while the combobox state is turned off)

    If you could share the code of your example, so i can try it directly on my projects as an aid to coding i'd be very grateful.

    Thanks for your answer.

    Fernando.

  • Hi Umalo, thanks very much for sharing the code. and your fast and precise answer. Works perfect!!! *thumbsup*

    Note for other users: The code as it is works for krpano 1.19 pr 14 (not pr 13 or older) due to the new if / ifnot structure


    Very grateful,

    Fernando

Jetzt mitmachen!

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