Hi! I want to make polygonal hotspot caused the image that would be as close as possible attached to him. As a parent/child does not work in polygon hotspots, I made it so that the mouse coordinates passed to the layer with the image. If you move the cursor off the polygonal hotspot, the image should disappear. But there is a problem! When I put my cursor over the hotspot, the picture turns on and off. Is there a way to make it so that while the cursor is over the polygon, the image would be stable?
Code
<layer name="h_117" url="117.png" visible="true" scale="0.1" alpha="1.0" capture="false" handcursor="false" bgcapture="true" enabled="true" />
<layer url="117.png" visible="false" onloaded="removeplugin(get(name));" />
<!-- place your scene hotspots here -->
<hotspot name="hot1" fillcolor="0x37c837" fillalpha="0.5" borderwidth="3.0" bordercolor="0xfc0404" borderalpha="0.0" capture="false" hovering="true"
depth="1000"
polyline="false"
scaleflying="true"
tx="0"
ty="0"
tz="0"
onover="picture(); tween(layer[h_117].scale, 0.6, 0.2); tween(alpha, 0.1, 0.25); "
ondown="set(fillcolor, 0xc83737)"
onout=" tween(layer[h_117].scale, 0.0, 0.3); tween(alpha, 0.5, 0.25);"
onclick="">
<point ath="0.136446" atv="-0.124447" />
<point ath="0.153899" atv="-0.103399" />
<point ath="0.174588" atv="-0.119971" />
<point ath="0.165469" atv="-0.130844" />
</hotspot>
<action name="picture">
set(Y1, get(mouse.y));
add(Y1, -20);
set(layer[h_117].x, get(mouse.x));
set(layer[h_117].y, get(Y1));
</action>
Alles anzeigen