die ganze Nacht wie blöd rumprobiert...
warum klappt es nicht?
Soll mir bei klick auf icon ein foto, zentriert aufmachen.
hab mir das aus der gallery copiert:
<hotspot name="icon" url="cam.png" ath="-145" atv="-9" width="50" height="41" onover="action(scaleup,icon);" onout="action(scaledown,icon);" onclick="action(showimage,img1);" />
<!-- scaleup/down actions for icon -->
<action name="scaleup">
tween(hotspot[%1].width,70,distance(25,0.2),easeoutcubic);
tween(hotspot[%1].height,57,distance(25,0.2),easeoutcubic);
</action>
<action name="scaledown">
tween(hotspot[%1].width,50,distance(25,0.2),easeincubic);
tween(hotspot[%1].height,41,distance(25,0.2),easeincubic);
</action>
<!-- image -->
<hotspot name="img1" url="image.jpg" align="center" alpha="0" visible="false" onclick="action(hideimage);" />
<!-- actions to show/hide images -->
<action name="hideimage">
tween(plugin[%1].alpha,0,distance(1,0.5),easeoutquad,set(plugin[%1].visible,false));
</action>
<action name="showimage">
action(hideimage);
set(plugin[%1].visible,true);
tween(plugin[%1].alpha,1,distance(1,0.5),easeoutquad);
</action>
Alles anzeigen
bei dem code von oben macht's mir das foto auch nicht auf
<hotspot name="infospot1"
url="cam.png"
ath="-145"
atv="-9"
scale="0.5"
onclick="showinfo(info1);"
/>
<plugin name="info1"
url="image.jpg"
parent="hotspot[infospot1]"
align="center"
visible="false"
alpha="0"
onclick="hideinfo( get(name) );"
/>
<action name="hideinfo">
tween(plugin[%1].alpha, 0, 0.5, default, set(plugin[%1].visible,false));
</action>
<action name="showinfo">
zuerst alle info felder ausblenden
hideinfo(info1);
dann den gewünschten einblenden
set(plugin[%1].visible,true);
tween(plugin[%1].alpha, 1.0);
</action>
Alles anzeigen
Muss ich vielleicht die Größe vom Image.jpg beachten, oder angeben?
Bin ratlos
Der rest vom code ist wie im Bsp. aus der tour.xml
Beist sich da vielleicht was?
<krpano version="1.0.8" onstart="action(load1);">
<include url="plugins.xml" />
<view fovmin="30" fovmax="150" fisheye="0"/>
<display details="22" />
<!-- change the default textstyle for showtext: -->
<textstyle name="DEFAULT"
font="Arial" fontsize="14"
border="false" background="false"
textcolor="0xFFFFFF"
effect="glow(0x000000,0.7,4,2);dropshadow(4,45,0x000000,4,1);"
/>
<textstyle name="smalltext"
font="Arial" fontsize="10"
border="false" background="false"
textcolor="0xFFFFFF"
effect="glow(0x000000,0.7,4,2);dropshadow(2,45,0x000000,3,1);"
/>
<plugin name="map" url="map.png" zorder="1" align="righttop" edge="righttop" x="16" y="16" alpha="0.85" handcursor="false"
width="318"
height="120"
onhover="showtext(Karte schließen,smalltext);"
onclick="action(closemap);"
/>
<plugin name="spot1" url="mappoint.png" zorder="2" align="righttop" edge="center" x="293" y="87" onhover="showtext(bar);" onclick="action(load1);" />
<plugin name="spot2" url="mappoint.png" zorder="2" align="righttop" edge="center" x="165" y="71" onhover="showtext(kleiner);" onclick="action(load2);" />
<plugin name="spot3" url="mappoint.png" zorder="2" align="righttop" edge="center" x="135" y="73" onhover="showtext(main);" onclick="action(load3);" />
<plugin name="spot4" url="mappoint.png" zorder="2" align="righttop" edge="center" x="96" y="101" onhover="showtext(oben);" onclick="action(load4);" />
<!-- first hotpot -->
<plugin name="spotx" url="mappointactive.png" zorder="4" align="righttop" edge="center" x="293" y="87" />
<!-- radar plugin, set heading with "plugin[radar].heading" -->
<plugin name="radar" url="plugins/radar.swf" zorder="3" align="righttop" edge="center" x="293" y="87" width="80" height="80" />
<plugin name="zoombuttons" url=" plugins/zoombuttons.swf" />
<!-- actions -->
<action name="startloading">
set(hotspot.visible,false);
push(view.fovmin);
set(view.fovmin,1);
</action>
<action name="loadingdone">
pop(view.fovmin);
set(hotspot.visible,true);
</action>
<action name="lookinterrupt">
action(loadingdone);
breakall();
</action>
<action name="load1">
set(plugin[spotx].x,293);
set(plugin[spotx].y,87);
set(plugin[radar].x,293);
set(plugin[radar].y,87);
loadpano(1.xml,null,KEEPALL,BLEND(2));
set(plugin[radar].heading,10);
</action>
<action name="load2">
set(plugin[spotx].x,165);
set(plugin[spotx].y,71);
set(plugin[radar].x,165);
set(plugin[radar].y,71);
loadpano(2.xml,null,KEEPALL,BLEND(2));
set(plugin[radar].heading,2);
</action>
<action name="load3">
set(plugin[spotx].x,135);
set(plugin[spotx].y,73);
set(plugin[radar].x,135);
set(plugin[radar].y,73);
loadpano(3.xml,null,KEEPALL,BLEND(2));
set(plugin[radar].heading,180);
</action>
<action name="load4">
set(plugin[spotx].x,96);
set(plugin[spotx].y,101);
set(plugin[radar].x,96);
set(plugin[radar].y,101);
set(radar.heading,270);
loadpano(4.xml,null,KEEPALL,BLEND(2));
set(plugin[radar].heading,98);
</action>
<action name="showspots">
set(plugin[spot1].alpha,0);
set(plugin[spot2].alpha,0);
set(plugin[spot3].alpha,0);
set(plugin[spot4].alpha,0);
set(plugin[spotx].alpha,0);
set(plugin[radar].alpha,0);
set(plugin[spot1].visible,true);
set(plugin[spot2].visible,true);
set(plugin[spot3].visible,true);
set(plugin[spot4].visible,true);
set(plugin[spotx].visible,true);
set(plugin[radar].visible,true);
tween(plugin[spot1].alpha,1);
tween(plugin[spot2].alpha,1);
tween(plugin[spot3].alpha,1);
tween(plugin[spot4].alpha,1);
tween(plugin[spotx].alpha,1);
tween(plugin[radar].alpha,1);
</action>
<action name="hidespots">
set(plugin[spot1].visible,false);
set(plugin[spot2].visible,false);
set(plugin[spot3].visible,false);
set(plugin[spot4].visible,false);
set(plugin[spotx].visible,false);
set(plugin[radar].visible,false);
</action>
<action name="closemap">
action(hidespots);
set(plugin[map].onhover,showtext(Karte öffnen,smalltext););
set(plugin[map].onclick,action(openmap););
tween(plugin[map].width,32,distance(318,0.5),easeoutquad);
tween(plugin[map].height,32,distance(120,0.5),easeoutquad);
</action>
<action name="openmap">
set(plugin[map].onhover,showtext(Karte schließen,smalltext););
set(plugin[map].onclick,action(closemap););
tween(plugin[map].width,318,distance(318,0.5),easeoutquad);
tween(plugin[map].height,120,distance(120,0.5),easeoutquad,action(showspots););
</action>
</krpano>
Alles anzeigen
DANKE für Unterstüzung