I spent several hours reading different ways to make a photo pop out when I click on a hotspot and this one seems simple and does all I need.
<plugin name="spot4" style="mapspot-photo" x="396" y="98" onclick="closemap(); wait(0.5); tween(plugin[bedroom].alpha,1);tween(plugin[bedroom].scale,1); "/>
<plugin name="bedroom" url="hotspots/bed.jpg" keep="true" handcursor="false" align="center" edge="center" alpha="0" scale="0" onclick="tween(plugin[bedroom].alpha,0);tween(plugin[bedroom].scale,0);"/>
It simply tweens from alpha and scale = 0 to 1.
That's all works ok but then I wanted to improve the startup action so that it moves to a viewpoint on loading the initial tour, as follows:
<action name="startup">
<!-- load the first scene -->
loadscene(get(scene[0].name), null, MERGE);
set(view.architectural,1.0);
lookat(-5, 14);
wait(BLEND);
lookto(-76,3,100,smooth(100,100,30));
</action>
When I add these lookat and lookto instructions the photos no longer pop out.
Can anyone see what I'm doing wrong?
The tour and xml are here:
http://www.opticalfx.co.uk/ipadtest/index.html
http://www.opticalfx.co.uk/ipadtest/tour.xml
http://www.opticalfx.co.uk/ipadtest/buttons.xml
The hotspots are the 3 camera icons on the floorplan. They currently work until you add the code above to startup.
Any help greatly appreciated.
Thanks,
Adrian