PDA

View Full Version : How parametrize spherical images


FMX
07-22-2008, 02:55 PM
Hello,

I am a newbie and trying the flashpanoramas with spherical images.
For some reason my very basic testfile doesn't bring up any panoramic image and only shows a blanc screen.

Follow this link to check it. (http://www.fometrix.com/walburgis/fpp/walburgistower.html)

See also updated post below.

Most likely I will overlook something or put in something wrong. Can anybody help me to setup this basics so I have a working sample to continue working on.

Thanks,


Wout

AxeCrazy
07-22-2008, 05:16 PM
when i open up the directory (which in readable for the world :P ) i can see that the pano.swf file is not available in the directory, but you do include it in the html, that sound like a problem ;)
also the the ../js/swfobject.js which is called in the html is not available..

Perhaps, just dumping everything into 1 directory is a better idea

FMX
07-23-2008, 08:14 AM
I have updated the remote files and now get a "loading failed" message.
It may have to do with my paramaters in the call of the swf-object:

<scr1pt type="text/javascript">
var so = new SWFObject("pano.swf", "sp01", "800", "600", "9", "#FFFFFF");
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.addVariable("panoName", "../pano/sp01/sp01.jpg");
so.addVariable("sensitivity", "50");
so.addVariable("keySensitivity", "50");
so.write("flashcontent");
</scr1pt>

I am not sure about the call for de panoname, allthough the path is right.

Got a clue?

Rob
07-23-2008, 11:38 AM
Hiya,

Try this:


Put your walburgistest.xml file into the same directory as your pano.swf
Rename your pano.swf file to walburgistest.swf
Put your pano sp1.jpg into this directory, along with limmits.swf, cylConverter.swf, glassmeter.swf
Change the refrence to this image file in your xml, along with the path to limits.swf, cylConverter.swf, glassmeter.swf


In your html (walburgistest.html) your script should look like this:


<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("walburgistest.swf", "pano", "100%", "100%", "9", "#282828");
so.addVariable("xml_file","walburgistest.xml");
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
</script>

Im still n00b here too, but with any luck that should help you out.


Regards,

Rob

siesfor
07-23-2008, 06:21 PM
hi fmx, your problem lies in your xml file, you have...

panoType = cylinder
panoName = walburgistest

...located within your <cylConverter> tags, when it needs to be inside your <parameters> tags instead.

so, go ahead and move "panoName" and "panoType" up inside your parameters tags and your pano should be good to go.

FMX
07-25-2008, 12:29 PM
I started again from scratch and get the same result: a black screen.

My files are all in one map except the swfobject:

fpp:
walburgistower.html = starting page
tower01.xml = first xml-file for spherical image with preview
sp02_LowRes.jpg = lowres spherical image
sp02.jpg = spherical image
cylConverter.swf
limits.swf
glassMeter.swf
show_pano.swf
openFullscreen.swf
autorotator.swf

files:
swfobject.js

walburgistower.html contains the following code:

<!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" lang="en" xml:lang="en">
<head>
<title>Zutphen Walburgis toren: virtuele tour</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="files/swfobject.js"></script>
</head>

<body>
<div id="flashcontent">
<br />
<h4 align="center">To experience this virtual tour Flashplayer 9 is required.</h4>
<h5 align="center">Use this <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&amp;Lang=D utch" target="_blank">Click</a>, to download and install.</h5>
<p></p>
<p><br />
</p>

<script type="text/javascript">
var so = new SWFObject("show_pano.swf", "pano", "100%", "100%", "9");
so.addVariable("xml_file", "tower01.xml");
so.addVariable("redirect", window.location);
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
window.document["pano"].focus();
</script>
</div>
</body>
</html>


tower01.xml contains this code:

<?xml version = '1.0' encoding = 'utf-8'?>
<panorama>

<parameters>
zoomHome = 1.0
disableLoading=1
loaderTextColor = #000000
loaderBackColor = #282828
loaderText =

panoType=cylinder

layer_1 = hotspots.swf
layer_2 = glassMeter.swf
layer_3 = limits.swf
layer_4 = cylConverter.swf
layer_5 = autorotator.swf
layer_6 = openFullscreen.swf
</parameters>

<hotspots>
<global
onStart = "loadPreview();"

loadPreview = "
loadPano(?panoName=sp02_LowRes,300);
onTransitionEnd=loadMain();
pano.qualityStatic=low"

loadMain = "
loadPano(?panoName=sp02,600);
onTransitionEnd="

onLoad="alpha=0; alpha=1,1000"
>

<pano />
</global>
</hotspots>

</panorama>


Could someone please explain to me why this is not working? :confused:
Show me the light!


Wout.

AxeCrazy
07-25-2008, 01:22 PM
i get an error while opening the page?
http://www.fometrix.com/walburgis/fpp/walburgistest.html
is it really a blank screen or loadin failed?

FMX
07-25-2008, 01:32 PM
I am sorry, changed also the filename.

Here is the correct link. (http://www.fometrix.com/walburgis/fpp/walburgistower.html)

siesfor
07-25-2008, 03:41 PM
the problem seems to be with your "show_pano.swf" file.

var so = new SWFObject("show_pano.swf", "pano", "100%", "100%", "9");

2 choices. either drop the "show_pano" file and use "pano.swf"

Or

if you wanted to use show_pano, then change the file's name to "show_tower01.swf"
and don't forget to change the html's reference to the file as well, and all should be good.

FMX
07-25-2008, 08:04 PM
Thanks I now have the panorama running but....

.... it uses the full width but not the full height allthoug both parameters are set to "100%" in the swfobject.

Is it or can it be set in other place? Where?

siesfor
07-26-2008, 05:50 PM
I'm not seeing any problem with the height online, it fills my browser window completely. Viewing the html locally though, after the security tab comes down asking to "allow blocked content" it leaves a lil gap about the height that the tab was, but otherwise, online everything looks okay. This is using IE though, don't know about other browsers.

FMX
07-26-2008, 09:23 PM
You are right in IE everything works oke.

It seems the problem is related to Mozilla Firefox 3.01.

At the description of the swfobject-object I noticed you had to include this piece of code and suddenly the problem has gone.

/* hide from ie5 mac \*/
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
/* end hide */
body {
height: 100%;
margin: 0;
padding: 0;
background-color: #FBF9EC;
}


Thanks all. Item closed.


Wout