PDA

View Full Version : panoramas in separate folder to html page


Ken
06-05-2007, 11:36 AM
I've just started with Flash Panorama Player, having had a bit of a frustrating experience with Immervisions Pure Player, and I'm very impressed. I managed to get a test page running from a cubical in no time at all.

I want to use Flash Panorma player to display a pano on the index page of my site replacing the still jpeg that's currently there http://www.lookaroundcornwall.com

I'm using SWFObject to embed the pano, but I'm having problems referencing the panorama.swf and cubical images when in a diferent folder to the index page.

Here http://lookaroundcornwall.com/flashplayer/test_flash.htm I've got everything in the same folder and it works fine.

Here http://lookaroundcornwall.com/index_flash.htm I've put the page in the root folder and changed the code from

<script type="text/javascript" src="/scripts/swfobject.js"></script>
<div id="flashcontent" style="position:absolute; left:0px; top:60; width:756px; height:228; z-index:12">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("tipi_01.swf", "pano", "756", "228", "9", "#666666");
so.write("flashcontent");
</script>

to

<script type="text/javascript" src="/scripts/swfobject.js"></script>
<div id="flashcontent" style="position:absolute; left:0px; top:60; width:756px; height:228; z-index:12">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("flashplayer/tipi_01.swf", "pano", "756", "228", "9", "#666666");
so.write("flashcontent");
</script>

to reference the 'tipi_01.swf' file in the flashplayer folder. Makes no difference if /flashplayer/tipi_01.swf is used and in any case the script appears to work fine - its the loader that's failing to find the cubical images by the looks of it.

Any ideas?

Ken
06-05-2007, 07:46 PM
Found the answer to my own question

so.addVariable("panoName", "flashplayer/tipi_01");

in the html file.

Now, I'm using a hotspot to jump to another html page, but the default opens the page in a new browser windo. Can anyone tell me how to open it in the same window?

The html page is here

http://lookaroundcornwall.com/index_flash.htm

and the hotspot code in the XML file

<hotspots>
<global>
<spot id="spot_id" url="flashplayer/title.png" static="1" onClick="openUrl(panos/tipi_lake.htm)" />
</global>
</hotspots>

Ken
06-05-2007, 08:28 PM
and again

<spot id="spot_id" url="flashplayer/title.png" static="1" onClick="openUrl(panos/tipi_lake.htm,_self)" />

if only i'd learn to rtfm before posting :oops: