onclick = " IF...."

  • I'm in front of a computer whole day, its getting late and i kinda need this urget.
    I just need to figure how is IF properly set, what am i missing? *unsure*

    Quote


    <hotspot name="spot3" style="hotspot_ani_white" ath="11.950" atv="7.138" onclick="
    if(layer[text].visible==true)

    set(layer[text].visible,false;
    else
    set(layer[text].visible,true;

    "/>

    Quote


    basicly, what i want is that when someone clicks on a hotspot he gets a message (textfield). if that textfield is already visible clicking would hide it.
    Thank you in advance

  • Hi!

    I think this should be like this:

    Code
    <hotspot name="spot3" style="hotspot_ani_white" ath="11.950" atv="7.138" onclick="if(layer[text].visible == true, set(layer[text].visible,false);, set(layer[text].visible,true);  );"/>


    Hope this helps *smile*

    Regards,

    Alexey

Participate now!

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