PDA

View Full Version : Clickable pictures in office demo


patrick@m4
09-12-2007, 03:51 PM
I've been trying to get the clickable pictures in the office demo to work (http://flashpanoramas.com/player/examples/livepanoedit.html)

I've used a simplified version of the XML of above and a pano from the tutorials:

http://www.m4admin.co.uk/test/ - scroll down and left a bit to find the picture. When you click on the image it moves forward a bit, and when you click again nothing happens - what am I doing wrong?

XML http://www.m4admin.co.uk/test/livePanoEdit.xml:

<?xml version="1.0"?>
<panorama>

<parameters>

panoName=images/nature

layer_2=files/hotspots.swf?1
layer_4=files/glassMeter.swf

</parameters>

<hotspots>

<global onTransitionEnd="externalInterfaceID=live;pano.disableControls=0;pr eview.id=;" goUp=" pano.qualityStatic=low saturation=0,1000 depth=15 static=1 scaleable=0 staticX=0,1000 staticY=0,1000 scale=1,700 distance=1,2100,elastic rotationX=0,2100,elastic rotationY=0,2100,elastic rotationZ=0,2100,elastic global.timer=1,2100,-,restoreQuality " goDown=" pano.qualityStatic=low saturation=-0.5,1000 depth=10 static=0 scaleable=1 scale=0.5,500 distance=1,600 rotationX=0,600 rotationY=0,600 global.timer=1,700,-,restoreQuality " restoreQuality="pano.qualityStatic=medium">




<box id="pic1" linked="images/nature" url="images/01.jpg" saturation="-0.5" pan="-50" tilt="-38" scale="0.5" orientation="down" rotationZ="-33" onClick="openMe()" openMe="hidePic(); global.hidePic=pic1.closeMe; goUp(); scale=0.9,700; onClick=closeMe;" closeMe="global.hidePic=; goDown(); pan=-50,700; tilt=-38,700; rotationZ=-33,700; onClick=openMe;"/>





</global>

</hotspots>

</panorama>

The two things I've changed is the pano name to nature and the image to 01 instead of IMG_2.jpg.

I've got the V 2.1 files.

Any help is much appreciated! :)

neil
09-13-2007, 02:19 AM
Hi Patrick,

There are a few syntax errors and formatting problems that are stopping your hotspot image from working. Make sure you use "()" after the function name when calling a function. Try the XML script below and see if it helps. Also in your HTML page set the Flash version to 9 as below (there are a few other changes you'll see if you compare the scripts).

<!-- HTML -->
<script type="text/javascript" src="files/swfobject.js"></script>
<div id="flashcontent">This content requires <a href="http://www.adobe.com/go/getflashplayer/">Adobe Flash Player</a>.<br />
Built on <a href="http://flashpanoramas.com/player/">Flash Panorama Player</a>.</div>
<script type="text/javascript">
var so = new SWFObject("files/pano.swf", "pano", "600", "500", "9", "#282828");
so.addVariable("xml_file","livePanoEdit.xml");
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
window.document["pano"].focus();
</script>
</div>

<!--XML-->

<?xml version="1.0"?>
<panorama>

<parameters>

panoName=images/nature

layer_2=files/hotspots.swf
layer_4=files/glassMeter.swf

</parameters>

<hotspots>

<global onTransitionEnd="pano.disableControls=0;preview.id=;"

goUp="
pano.qualityStatic=low
saturation=0,1000
depth=15
static=1
scaleable=0
staticX=0,1000
staticY=0,1000
scale=1,700
distance=1,2100,elastic
rotationX=0,2100,elastic
rotationY=0,2100,elastic
rotationZ=0,2100,elastic
global.timer=1,2100,-,restoreQuality"

goDown="
pano.qualityStatic=low
saturation=-0.5,1000
depth=10
static=0
scaleable=1
scale=0.5,500
distance=1,600
rotationX=0,600
rotationY=0,600
global.timer=1,700,-,restoreQuality"

restoreQuality="pano.qualityStatic=medium"
>

<box id="pic1" linked="images/nature" url="images/01.jpg" saturation="-0.5" pan="-50" tilt="-38" scale="0.5" orientation="down" rotationZ="-33" onClick="openMe()" openMe="hidePic();global.hidePic=pic1.closeMe;goUp();scale =0.9,700;onClick=closeMe;" closeMe="global.hidePic= ;goDown();pan=-50,700;tilt=-38,700; rotationZ=-33,700;onClick=openMe;" />

</global>

</hotspots>

</panorama>

patrick@m4
09-13-2007, 07:21 AM
Thanks very much I've got it work now :D