Any way to swap one button for another on an event other than fullscreen?

  • This code works great for switching the button graphic that appears when in and out of fullscreen... is there an "event" that would allow me to do the same for switching the graphic for the "hotspots button"...

    Basically I was hoping to find a clean way to have an illuminated graphic appear when the hotspots are on, and a darker graphic appear when the hotspots are off ("turn hotspots on", "turn hotspots off").

    TIA- Blake

    ============================================

    <plugin name="openfs"
    url="btn_openfs.png"
    visible="true"
    alpha="0.85"
    align="bottom"
    edge="center"
    y="40"
    x="+120"
    blendmode="normal"
    onhover="showtext(enter fullscreen);"
    onover="set(blendmode,add);"
    onout="set(blendmode,normal);"
    onclick="set(fullscreen, true);"/>

    <plugin name="closefs"
    url="btn_closefs.png"
    visible="false"
    alpha="0.85"
    align="bottom"
    edge="center"
    y="40"
    x="+120"
    blendmode="normal"
    onhover="showtext(exit fullscreen);"
    onover="set(blendmode,add);"
    onout="set(blendmode,normal);"
    onclick="set(fullscreen, false);"/>

    <events onenterfullscreen="set(plugin[openfs].visible,false); set(plugin[closefs].visible,true);"
    onexitfullscreen="set(plugin[openfs].visible,true); set(plugin[closefs].visible,false);"/>

  • Hi,

    are two possibilities:

    1. use two buttons (recommended solution)

    • one button to hide the hotspots
    • the other to show it
    • both buttons are on the same position
    • only one button is visible at the moment
    • on clicking one button, the visibility of the buttons is swapped

    example source:


    2. or use only one button and switch the image of it

    example source:

    regards,
    Klaus

Jetzt mitmachen!

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