PDA

View Full Version : Embedding pano.swf in different directories?? Please help!


vrmediasolutions
08-05-2008, 04:04 AM
Hello all,

So I'm new to FPP and love it. Not a lot of XML experience, but not a newbie to the web development at all.

I've searched the forums for 5 hours now and can not find a solution to, for example embedding the pano.swf file on my home page while the other files (xml, photos and such) are cleanly tucked away in an organized directory system.

Better Explanation:
- Home page is in the root of the site.
- All Virtual Tour files are in a 'virtualtour' directory.

HOW DO I MAKE THE TOUR PLAY ON THE HOME PAGE?????

I know the tutorials call to keep all files in the same directory, but honestly this is a very messy way for me to organize files amongst a very large site.

This is my only issue with FPP, everything else works GREAT!

Thanks in advance for all your help.

Bradimus
08-18-2008, 07:50 PM
I am having the same problem. Does anyone have a solution?

cheathamlane
08-18-2008, 09:44 PM
Not a lot of XML experience, but not a newbie to the web development at all.

How's your HTML and/or familiarity with embedding Flash in a Web page? :)

This isn't necessarily an FPP issue -- it's just one of telling your Web page where the files are. And then making sure FPP can get to them.

Take the page at http://cheathamlane.net (view source, then scroll through all the junk down to the embedding code for the FPP presentation).

I have a file structure of index.html at the root level ("/"), then all of my FPP stuff lives under /files/_demotours/.


<script type="text/javascript">
var so = new SWFObject("files/_demotours/base/preview_pano.swf", "pano1", "100%", "525", "6.0.65", "#FFFFFF");
so.addParam("base","/files/_demotours/")
so.addVariable("preview","panos/sfcm/preview_image/preview_sfcm.jpg");
so.addVariable("movie","base/pano.swf?panoName=panos/sfcm/images/Concert_1-sm/Concert_1-sm&xml_file=panos/sfcm/xml/Concert_1-sm.xml");
so.addVariable("xml_file","_setup.xml");
so.addVariable("redirect", window.location);
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
window.document["pano"].focus();
</script>


See the "base" parameter there? You can add this parameter to the embedding code for your Flash file, and it will then assume that anything new you load into it (ie, your XML, your FPP SWF files, your pano images) lives somewhere under that base file path.

In my case I'm using the FPP preview_pano.swf file, so I load it in with its full path of files/_demotours/base/preview_pano.swf.

Then I load in the "main" FPP pano.swf from its folder called "base" (ha, just to be confusing I named it 'base' ;) ). Because I've used the "base" parameter, Flash is actually loading the file from:
files/_demotours/base/pano.swf?panoName=files/_demotours/panos/sfcm/images/Concert_1-sm/Concert_1-sm&xml_file=files/_demotours/panos/sfcm/xml/Concert_1-sm.xml

And this line: so.addVariable("xml_file","_setup.xml") is actually loading like this: so.addVariable("xml_file","files/_demotours/_setup.xml").

Inside _setup.xml, all the paths to my hotspot files do not include the "files/_demotours/" because the "base" parameter is putting it there for me.

Confused yet?

Cheers,

vrmediasolutions
08-22-2008, 12:42 AM
Hello cheathamlane,

XHTML is great, but Java skills are greatly lacking. I used to run object and embed tags. I'll try your recommendations. Thank you so much for your reply, I've talked with others and I know I'm not the only one with this concern.

cheathamlane
08-22-2008, 01:02 AM
Hello cheathamlane,

XHTML is great, but Java skills are greatly lacking. I used to run object and embed tags. I'll try your recommendations. Thank you so much for your reply, I've talked with others and I know I'm not the only one with this concern.

Hi vrmediasolutions (is that your real name? ;) ):

I hope what I posted helps!

It is Javascript, too (and not Java). Once you get your head wrapped around using SWFObject or similar methods of embedding, your life will become much simpler. :)

Cheers,

Bradimus
08-26-2008, 02:41 AM
@cheathamlane

Thanks. That example was exactly what I needed.

Dejacque
09-14-2008, 05:22 PM
I, too, would like a little bit more info on how to do this- vrmediasolutions seems to have picked this up quite well, but I'm struggling to understand a few things here.

I've just bought FPP, after using PanoSalado, which is good, but FPP seems to offer just a little more of what I would like. I hoped that the documentation for FPP would be sufficient and fairly straight-forward for a n00b like me, but unfortunately it isn't :(

I don't understand what the "_setup.xml" file is for here? The only XML file I can see that is needed is already mentioned - Concert_1-sm.xml - isn't it?

Here's what I have for my HTML page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>



<script type="text/javascript" src="files/swfobject.js"></script>
<div id="pano">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("files/_demotours/base/preview_pano.swf", "wyre001", "100%", "100%", "6.0.65", "#FFFFFF");
so.addParam("base","/files/_demotours/")
so.addVariable("preview","panos/wyre001/preview_image/wyre001_preview.jpg");
so.addVariable("movie","base/pano.swf?panoName=panos/wyre001/images/wyre001&xml_file=panos/wyre001/xml/wyre001.xml");
so.addVariable("xml_file","_setup.xml");
so.addVariable("redirect", window.location);
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
window.document["pano"].focus();

</script>



</body>
</html>

And this is my XML file (wyre001.xml):

<?xml version="1.0" ?>
<panorama>
<parameters>
tiltHome = 80
zoomHome = 2
layer_4 = hotspots.swf

panoType=cylinder
panoName=panos/wyre001/images/wyre001

</parameters>

<cylconverter>
hfov = 180
vfov = 60
</cylconverter>

I've tried to copy Patrick's file structure, as you can see.

All I see is the Flash placeholder text when I open the page.

Will FPP have documentation for multiple file management at some point? It's sorely needed- as much as Patrick's help is appreciated (and he's been a huge help on the PanoSalado forum), surely something like this should have full explanation as part of the FPP documentation?

If anybody can help me with a few pointers here, I would REALLY appreciate it!

Dejacque
09-21-2008, 03:23 PM
Nobody at all?

Jareish
09-22-2008, 06:20 AM
Can't you, instead of linking it to the panoName, link it to the xml file?
loadpano(xml_file=xml/1.xml)

<script type="text/javascript">
var so = new SWFObject("files/_demotours/base/preview_pano.swf", "wyre001", "100%", "100%", "6.0.65", "#FFFFFF");
so.addParam("base","/files/_demotours/")
so.addVariable("preview","panos/wyre001/preview_image/wyre001_preview.jpg");
so.addVariable("xml_file","panos/wyre001/xml/wyre001.xml");
so.addVariable("redirect", window.location);
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
window.document["pano"].focus();
</script>

in wyre001.xml you put panoName=panos/wyre001/image/wyre001 (so the xml will search for wyre.001.jpg in panos/wyre001/image directory)

then you create hotspots
onClick=loadpano(xml_file=xml/panos/wyre002/xml/wyre002.xml)
or
onClick=loadpano(xml_file=xml/panos/wyre003/xml/wyre003.xml)

etc, whatever directory, just make sure the panoName is mentioned in the xmlfile.

Dejacque
09-22-2008, 09:14 PM
Okey doke... More or less got it sorted.

Ta for the input, Jareish!

Dejacque
09-22-2008, 10:07 PM
Okay,

The panos load fine with how I've got them organised now (I went for separate XML files, as it was just easier that way).

I'm trying to get the panos to display hotspots that will open a new pano when clicked, using the following:

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

<parameters>

layer_10 = files/glassMeter.swf
layer_1 = files/fps.swf
layer_3 = files/limits.swf
layer_4 = files/autorotator.swf
layer_5 = files/cylConverter.swf
layer_8 = files/menuFullscreen.swf
layer_6 = files/hotspots.swf

panoType=cylinder
panoName=panos/8

loaderStreamed = 0
loaderBandwidth = 0

segments=40

loaderText=

</parameters>

<cylconverter>
autoLimits=1
strictBorders=0
hfov =
vfov =
</cylconverter>

<hotspots>
<global>
<pano pan="100" tilt="-1" />
<spot id="spot_id" url="images/black_i.png" pan="0" tilt="-9" onClick=loadpano(xml_file=xml/wyre002.xml) />
</global>
</hotspots>

</panorama>

As soon as I use everything between (and including) the <hotspots> tags, the screen just displays grey- the pano doesn't load. It doesn't even tell me that it's 'failed'...

Can someone see what it is that I'm doing wrong?

LepLep
09-23-2008, 04:38 AM
onClick=loadpano(xml_file=xml/wyre002.xml)

just double check this line :)

Dejacque
09-23-2008, 09:49 PM
just double check this line :)

I have double-checked it, but still can't seem to find a problem with it? What is the problem that you can see?

Nate
09-24-2008, 12:10 AM
you need the pano name and the xml file. Check the tutorial in the help files...

siesfor
09-24-2008, 01:09 AM
What I think, LepLep, was so enigmatically hinting at, were the lack of quotation marks on your onClick command...

onClick="loadpano(xml_file/wyre002.xml)"
very easy to overlook simple, little things like that.

Really good eye there, LepLep.

Nate
09-24-2008, 07:30 AM
easily overlooked by me :) Can you load a new pano just by calling an xml file?

siesfor
09-24-2008, 02:38 PM
the only difference, is that you place the panoName information in the xml file, instead of inside the loadpano command.

Dejacque
09-24-2008, 10:05 PM
What I think, LepLep, was so enigmatically hinting at, were the lack of quotation marks on your onClick command...


very easy to overlook simple, little things like that.

Really good eye there, LepLep.

Nope, it's not that... I'd tried it with and without quotation marks before.

The pano still refuses to load and still only displays the grey background where the Flash player should be. If I take out the 'loadpano' section, then the pano works.

siesfor
09-25-2008, 01:07 AM
Might want to try that again Dejacque, copying your xml you provided and changing only the panoName in the <parameters> section, I get the dead grey screen like you mention, but after placing the quotation marks around the loadpano command, everything loads fine.

<spot id="spot_id" url="images/black_i.png" pan="0" tilt="-9" onClick="loadpano(xml_file=xml/wyre002.xml)" />

make sure you have the quotation marks in the right spots, placing them anywhere else, also, causes a dead screen.

Dejacque
10-04-2008, 11:55 PM
Seems I forgot to thank siesfor for his help ;) The subtle quotes were causing a little bit of trouble for me!

Well, it's working now and I've managed to put a couple of hotspots in one of the XML files. However, when clicking on one of the hotpots in the respective pano, it takes me to the pano specified, however the hotspots from the previous pano remain in place.

What should I be doing to clear those old hotspots and loading the new ones in the new pano?

siesfor
10-05-2008, 01:55 AM
What should I be doing to clear those old hotspots and loading the new ones in the new pano?

Check out the "linked" and "unlinked" parameters under Spot object parameters in the Hotspots tutorial. You can use whichever one requires linking/unlinking the fewest pano names.

LepLep
10-05-2008, 04:33 AM
What I think, LepLep, was so enigmatically hinting at, were the lack of quotation marks on your onClick command...

it looks like the location of tutorial files is much more enigmatic than that...

(i asked few times if anyone read it, but ok i will quit this question from now on)

Dejacque
10-05-2008, 05:19 PM
Check out the "linked" and "unlinked" parameters under Spot object parameters in the Hotspots tutorial. You can use whichever one requires linking/unlinking the fewest pano names.

Thanks, Siesfor- I had a look at the 'unlinked' parameter and it suggests that I should name each pano for which hotspots should not be loaded. This would seem to be quite cumbersome if you've got lots of hotspots in a pano, but also, it only shows you how to do this if your .swf files correspond to the pano names. As you can see from how I've specified mine, I have a single .swf file, several panos and all of them are called from a hotspot using the relative XML file.

<hotspots>
<global>
<pano pan="100" tilt="-1" />
<spot id="spot_id" url="images/hotspot-roundel.png" pan="-87" tilt="-2" onClick="loadpano(xml_file=xml/wyre007.xml)" />
<pano pan="100" tilt="-1" />
<spot id="spot_id" url="images/hotspot-roundel.png" pan="-95" tilt="-3" onClick="loadpano(xml_file=xml/wyre006.xml)" />
<spot id="spot_id" url="images/hotspot-roundel.png" pan="-95" tilt="-3" onClick="loadpano(xml_file=xml/wyre006.xml)" />
</global>
</hotspots>

This is what the tutorial tells me to do:

unlinked list of panoramas where hotspot is not loaded

This parameter supplement linked param. Specify all panorama names separated with "|" and they will be automatically unloaded for indicated panoramas:

<spot url="spot1.png" unlinked="nature|snow" /> (this hotspot is not loaded for panoramas with panoName=nature and panoName=snow)

So I'm just wondering if there's a way of saying unlinked="all", if you see what I mean?

siesfor
10-06-2008, 12:16 AM
that's why there's also "linked". look right above the entry for unlinked in the tutorial.

if you need the hotspot for only a pano or two, then use linked.
but if you need the hotspot for all of your panos except one or 2, then use unlinked.

The names nature and snow, in the example, aren't refering to a swf file, they're referencing the parameter "panoName".
so, whatever you have for "panoName" in wyre006.xml or in wyre007.xml that you either want to link the hotspot to, or unlink the hotspot from, is what you use for your "linked" or "unlinked" value.