Please help: mouse hover over logo show image - can't work it out...???

  • Hi everyone,

    I'm new to krpano and think this forum is great. *smile* Thanks to all the amazing people sharing little snippets of code I've been able to tweak the interface of my virtual tour even without programming experience. I've been stuck at a relatively simple task though and could not find anything on this forum. At the moment my virtual tour shows a logo in a grey bar at the top of the virtual tour. I would like to now add some code that shows an image file (.png) centred and scaled to 0.5 when the mouse hovers over that logo (and image disappears again when mouse in not hovering over logo anymore). This is the code for the logo I've got so far. If anyone could show me what to add, that would be superb! Many thanks.....

    <layer name="skin_shade_top" keep="true" type="container" bgcolor="0x000000" bgalpha="0.5" align="lefttop" width="100%" height="25" x="0" y="0" y_shown="0" y_hidden="-42" zorder="50">
    <plugin name="logo"
    url="%SWFPATH%/logo.png"
    keep="true"
    align="righttop" x="0" y="0"
    alpha="0.95" handcursor="true"
    enabled="true" capture="false"
    edge="righttop"
    scalechildren="true"
    scale="0.5"
    onclick="openurl(http://........);"
    />
    </layer>

    Einmal editiert, zuletzt von robphoto (4. Oktober 2012 um 06:30)

  • Hi!
    It's easy *thumbup*

    <layer name="skin_shade_top" keep="true" type="container" bgcolor="0x000000" bgalpha="0.5" align="lefttop" width="100%" height="25" x="0" y="0" y_shown="0" y_hidden="-42" zorder="50"
    onover="set(plugin[logo].visible,true);tween(plugin[logo].alpha,1);"
    onoout="tween(plugin[logo].alpha,0,,set(plugin[logo].visible,false););"
    />


    <plugin name="logo"
    url="%SWFPATH%/logo.png"
    keep="true"
    visible="false"
    align="righttop" x="0" y="0"
    alpha="0" handcursor="true"
    enabled="true" capture="false"
    edge="righttop"
    scalechildren="true"
    scale="0.5"
    onclick="openurl(http://........);"
    />


    Hope it help

    Regards
    Andrey *thumbup*

  • Hi Andrey,

    thank you so much for your help but unfortunately I don't know if I can use the code you wrote for me *sad* ?
    I wanted to achieve an effect like on that site: http://pixelcase.com.au/virtual-tours/…rs/#/Panorama1/

    My logo is in the top right corner like on the link above (see code I entered) and I want a window to pop up in the center of the screen when mouse hovers over my logo (like in link above).
    It would be amazing if you have the time to look at this again for me.

    Many thanks, Rob *smile*

  • Hi,

    got it all working now *smile* , thanks for all your help Andrey *thumbup*

    The final snippet of code in my .xml file is now:


    <layer name="skin_shade_top" keep="true" type="container" bgcolor="0x000000" bgalpha="0.5" align="lefttop" width="100%" height="25" x="0" y="0" y_shown="0" y_hidden="-42" zorder="50">
    <plugin name="logo"
    url="%SWFPATH%/logo.png"
    keep="true"
    align="righttop" x="0" y="0"
    alpha="0.95" handcursor="true"
    enabled="true" capture="false"
    edge="righttop"
    scalechildren="true"
    scale="0.5"
    onclick="openurl(http://..........);"
    onhover="set(plugin[info].visible,true);tween(plugin[info].alpha,1);"
    onout="tween(plugin[info].alpha,0,,set(plugin[info].visible,false););"
    />
    </layer>

    <plugin name="info"
    url="%SWFPATH%/info.png"
    keep="true"
    align="center" y="-7%"
    alpha="0" handcursor="true"
    enabled="true" capture="false"
    scalechildren="true"
    scale="0.5"
    />

Jetzt mitmachen!

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