Please be patient, I'm very new to KRPano! I have the following XML for test code:
<krpano version="1.0.8" ispartialpano="true">
<include url="skin/defaultskin.xml" />
<view hlookat="0" vlookat="0" maxpixelzoom="1.0" /> <display details="22" />
<preview url="4.tiles/preview.jpg" />
<image type="CYLINDER" multires="true" tilesize="751" progressive="true"> <level tiledimagewidth="10514" tiledimageheight="2623"> <cylinder url="4.tiles/l2_%0v_%0h.jpg" /> </level> <level tiledimagewidth="5257" tiledimageheight="1312"> <cylinder url="4.tiles/l1_%0v_%0h.jpg" /> </level> </image>
<plugin name="linktextfield" url="yellow.gif" html="[p]link: ....[/p]" css="p{color:#000000;font-family:Arial;font-size:14;margin-left:5;margin-right:5;text-align:left;}" backgroundcolor="0xFFFFFF" roundedge="0" shadow="2" borderwidth="1" bordercolor="0" blendmode="layer" width="30%" height="70%" autosize="left" align="center" visible="false" />
<action name="showproduct"> copy(cur_hlookat,view.hlookat); mod(cur_hlookat,cur_hlookat,360); roundval(cur_hlookat,2); copy(cur_vlookat,view.vlookat); roundval(cur_vlookat,2); copy(cur_fov,view.fov); roundval(cur_fov,1);
txtadd(plugin[productfield].html, '[p]ddddddddddddddddddddddddddddddddddddddd[/p]' ); set(plugin[productfield].visible,true); </action>
<view hlookat="12" vlookat="40" fov="105"/>
<style name="flyoutimage" distorted="false" backup_rx="0" backup_ry="0" backup_rz="0" backup_scale="0" backup_zorder="0" flying="0.0" flystate="0" onclick="if(flystate == 0, flyout_by_name(get(name)), flyback_by_name(get(name)) );"/>
<hotspot name="spot2" style="flyoutimage" url="decoded-large.png" zorder="1" ath="155" atv="8" scale="0.1" />
<!--flyout/flyback actions (for more stylish in/out animations play with different tweentypes and times)--><action name="flyout_by_name"><!-- make all other hotspots flying back -->flyback_others();<!--for best control set 4 fly states: 0 = normal 1 = while flying out 2 = out 3 = while flying back--><!-- save original position/rotation -->if(hotspot[%1].flystate == 0, copy(hotspot[%1].backup_rx, hotspot[%1].rx); copy(hotspot[%1].backup_ry, hotspot[%1].ry); copy(hotspot[%1].backup_rz, hotspot[%1].rz); copy(hotspot[%1].backup_scale, hotspot[%1].scale); copy(hotspot[%1].backup_zorder, hotspot[%1].zorder); );<!-- set new state -->set(hotspot[%1].flystate,1); set(hotspot[%1].zorder,99);<!--tween the rotations values to 0 for a flat screen view-->tween(hotspot[%1].rx, 0); tween(hotspot[%1].ry, 0); tween(hotspot[%1].rz, 0); tween(hotspot[%1].scale, 0.5);<!--tween 'flying' to 1.0, this makes the hotspot independent from the panorama rotation and scaling-->tween(hotspot[%1].flying, 1.0, 0.5, default, set(hotspot[%1].flystate,2); ); set(plugin[linktextfield].visible,true);</action><action name="flyback_by_name"> set(plugin[linktextfield].visible,false);if(hotspot[%1].flystate != 3, set(hotspot[%1].flystate,3);<!-- tween back to the stored backup values -->tween(hotspot[%1].rx, get(hotspot[%1].backup_rx) ); tween(hotspot[%1].ry, get(hotspot[%1].backup_ry) ); tween(hotspot[%1].rz, get(hotspot[%1].backup_rz) ); tween(hotspot[%1].scale, get(hotspot[%1].backup_scale) ); copy(hotspot[%1].zorder, hotspot[%1].backup_zorder);<!-- tween 'flying' also back to 0.0 -->tween(hotspot[%1].flying, 0.0, 0.5, default, set(hotspot[%1].flystate,0); ); );
</action><action name="flyback_others">if(%1 != nextloop, set(i,0)); if(hotspot[%i].style == flyoutimage, if(hotspot[%i].flystate != 0, flyback_by_name(get(hotspot[%i].name)); ); ); inc(i); if(i LT hotspot.count, flyback_others(nextloop); );</action>
</krpano>
Alles anzeigen
The idea is that an image of a book (decoded-large.png) sits on a shelf in the viewer and when the user clicks it, it flies out and sits in the center of the screen. This is perfect, it works great. The problem is I want to load a white square behind the book when it flies out so I can eventually add some text about the book down the side. Right now it loads the background (yellow.gif) in the center of the screen but the book hotspot is behind it. How do I get the book hotspot to show on top of the yellow plugin square?
To be clear, I'm willing to do this any way which works, this is just what I got from an example that was online and I'm trying to build on it. Thanks.