can not add hotspot at mouse clicked coordinates

  • i'm trying to add hotspot at mouse clicked coordinates.
    i tried

    Code
    <action name="click1" >  showlog(true); 
    addhotspot(newspot); 
    screentosphere(mouse.x,mouse.y,toh, tov); 
     trace(toh);  trace(tov); 
     set(hotspot[newspot].url,q.mark.png); 
    set(hotspot[newspot].ath,toh);
     set(hotspot[newspot].atv,tov); 
    set(hotspot[newspot].onclick, removehotspot(newspot) ); 
    </action>

    it's not working for me.but if i replace toh and tov with values then it works perfectly.what could be the problem?? from logs toh and tov have correct values

    Edited 2 times, last by sameer4 (May 30, 2017 at 1:50 PM).

  • Hi

    Try use COPY method like this:

    Code
    set(hotspot[newspot].url,'q.mark.png'); 
    copy(hotspot[newspot].ath,toh); 
    copy(hotspot[newspot].atv,tov);

    or:

    Code
    set(hotspot[newspot].ath,get(toh));
    set(hotspot[newspot].atv,get(tov));


    it should work *thumbup*


    Best regards
    Piotr

Participate now!

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