PDA

View Full Version : 1 pano.swf, 1 xml.xml, 100 panoxxx.mov


ftrippie
02-05-2008, 07:55 PM
Hi Guys,

I reckon this is very simple, but can't really find the answer:

If I have a large number of MOVs (or JPG, or Stripes, or Cubepanos, ...) in a folder together with only 1 pano.swf (the viewer) and only 1 xml.xml (the config, for all the same), what would be the html code to call a single pano out to show?

In other words, since for all the panos, the 'engine' (pano.swf) and the config (xml.xml) are the same, would I really need to have 3 files for every pano or can I just use 1 SWF and 1 XML , and pass them on in a html file (or single line)?

Cheers,
FTrippie

ftrippie
02-06-2008, 12:10 AM
I seems to have partly mananged myself using the cubeqtvr.html example

However, two questions remain:
1. I can use the standard (1 only) pano.swf, but I still have to create 1 XML file per pano in which it calls the pano. I can't seem to use the panoName variable in the HTML file and use the XML only for config and hotspots..

2. Even if I create one XML file per pano, it doesn't seem to get past the parameters part. It won't read the map and hotspots I have defined in that XML file..

Anyone?

Cheers,
FTrippie

zleifr
02-06-2008, 02:51 AM
Hi ftrippie,

You are right that you will need 1 xml file per pano image UNLESS they are all connected in a tour and by clicking a hotspot you go to another pano, in which case you only need 1 xml file. Based on your description, I don't think this is the case.

You might look at using php to generate your xml file, and have the html file just call the php instead of a static xml file, since all you'd need to do is have php specify the panoName parameter and print the rest as is.
PHP is probably your best ticket.

Zephyr

ftrippie
02-06-2008, 07:31 AM
Hi zleifr,

Thanks for replying.

I understand what you mean, but that might be difficult. My customer is going to implement this all in a flash environment. With interaction to a huge XML database.

They do need the virtual tour (multiple panos with map) as well, but that one I figured out and it works indeed perfectly with 1 XML file.

For the single panos, I can get my customer to accept that we will need 1 XML file per pano, although I still don't understand why that is necessary, since I call the panoName in the HTML file and the XML file is the same for every single pano.

Apart from that, I also don't understand (and this is more serious) that it doesn't read the spots and global parameters in the XML file.

Part of my HTML file:
<body>
<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> and a browser with JavaScript enabled.<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", "100%", "100%", "9", "#282828");
so.addVariable("xml_file", "test.xml");
so.addVariable("panoName","PI001P01");
so.addVariable("redirect", window.location);
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
</script>
</body>
</html>

Part of my XML file:
<?xml version="1.0" encoding="iso-8859-1"?>
<panorama>
<!-- parameters section -->
<parameters>
layer_10 = plugins/glassMeter.swf
layer_1 = plugins/fps.swf
layer_3 = plugins/limits.swf
layer_6 = plugins/cylConverter.swf
layer_7 = plugins/movDecoder.swf
layer_8 = plugins/menuFullscreen.swf
panoType=mov
</parameters>
<hotspots>
<global
MapSpotsOff="hs_map_0.visible=0
hs_map_1.visible=0
hs_map_2.visible=0
hs_map_3.visible=0
hs_map_4.visible=0
hs_map_5.visible=0
hs_map_6.visible=0
hs_map_7.visible=0
hs_map_8.visible=0
"
MapSpotsOn="hs_map_0.visible=1
hs_map_1.visible=1
hs_map_2.visible=1
hs_map_3.visible=1
hs_map_4.visible=1
hs_map_5.visible=1
hs_map_6.visible=1
hs_map_7.visible=1
hs_map_8.visible=1
">

<!-- image for map/floorplan -->
<spot
id="_map"
url="map.jpg"
static="1"
align="LT"
salign="LT"
alpha="0.7"
shadow="1"
shadowDistance="20"
shadowBlur="10"
shadowAlpha="0.7"
onOver="alpha=1"
onOut="alpha=0.6"
staticX="10"
staticY="10" />

<!-- hotspots of floorplan -->

<spot
id="hs_map_0"
etc.
etc.
etc.

zleifr
02-07-2008, 06:14 AM
Well, well, learn something new every day. I didn't realize you could put panoName in the javascript embed code in the HTML. Since you can do that, you ought to be able to use just one XML file.

As for not reading the <hotspots> node, I am going to put BIG money on that being on account of hotspots.swf is not be asked to load. Put layer_2 = plugins/hotspots.swf in there, and I think you'll be happy as a pig in mud.

Zephyr

ftrippie
02-10-2008, 02:05 PM
Ouch! That must have been it, how stupid :-(

I couldn't find the test (after a lot of other changes), but created something similar and it works perfectly.

Thanks!