Having problems with parent="hotspot[spot1]"

  • Hi,

    Come across an odd one here.

    I have a flat map image on screen with 20 marker hotspots applied. Each marker is a 'circle with a number on' png image.

    I've no problems at all with all the hospots showing on the map and clicking each one goes to the relevant index file. Problem is the client wants a mouse over adding to each hotspot showing a small thumbnail image which I can do but it's giving me problems.

    Code
    <hotspot name="spot1" url="skin/marker_1.png" children="true" scale="1.0" ath="-0.190" atv="0.269" onover="set(plugin[thumb01].visible,true);tween(plugin[thumb01].alpha,1);" 	onout="tween(plugin[thumb01].alpha,0,,set(plugin[thumb01].visible,false););" onclick="openurl('test/index.html',_self);" />
    Code
    <layer name="thumb01" align="center" x="110" y="-90" keep="false"  parent="spot1"  handcursor="false" zorder="2" url="skin/thumb01.jpg" visible="false" />

    Using parent="spot1" for the thumbnail in an attempt to align it to the hotspot doesn't work and the thumbnail appears but in the center area of the screen

    If I use parent="hotspot[spot1]" then the thumbnail is correctly aligned just to the top right of the hotspot but the thumbnail can also be moused over. The idea was that only the hotspot was able to be 'moused over', not the thumb01. How can that happen if its invisible by default?

    Also I noticed that the zorder="2" has no effect no matter what value I give it as the pop up thumb01 is always behind other surrounding hotspots.

    Any advice is appreciated.

    Thanks,

    Andrew

  • Thanks Klaus, that did the trick. *thumbup*

    Regarding the zorder part, is there any way to set an action that makes the current hotspot & it's thumbnail 'always on top' in relation to the other hotspots?

    The only alternative is to make each of the 20 hotspots a different zorder and it can be quite a challenge when everything is close together and bound to conflict with one or several of the others.

    <hotspot name="spot1" url="skin/marker_1.png" children="false" zorder="10" ........./>
    <hotspot name="spot2" url="skin/marker_2.png" children="false" zorder="11" ........./>
    <hotspot name="spot3" url="skin/marker_3.png" children="false" zorder="12" ........./>


    Cheers,

    Andrew

  • Hi,

    no, there is no trick or automatic, you could only do something like this - getting the current largest zorder and use it + 1:

    Best regards,
    Klaus

Jetzt mitmachen!

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