White square + SPi-v logo with XML-file.




Quicktime, Java Applets, Flash, or Shockwave?

White square + SPi-v logo with XML-file.

Postby tkappe on Mon Jul 17, 2006 10:28 pm

I'm trying to edit something in for the SPi-v engine.
When I'm pointing in my HTML doc to a JPG file, the file is correctly displayed on the screen.
However when I'm pointing to a XML file (containing the JPG file) I get a white square + the SPi-v logo on the screen.
The XML file is based on some examples from the SPi/v site.

Any suggestions to silve this problem....


T :arrow:
tkappe
 
Posts: 9
Joined: Wed Jul 12, 2006 8:38 am
Location: Netherlands

Postby Bert on Tue Jul 18, 2006 3:22 am

Post your XML file, so we can take a look....

Does SPI-v give a specific error message?
User avatar
Bert
Site Admin
 
Posts: 88
Joined: Fri Jun 09, 2006 2:20 pm
Location: Bali, Indonesia

Postby tkappe on Tue Jul 18, 2006 8:04 am

--------------------------------------------------------------------------------

Here the HTML doc with the XML file.
Structure on the site:

index
|_ [<DIR> dswmedia] huis.jpg, huisxml.xml, SPi-V.dcr

For an screen impression please visit:

http://members.chello.nl/t.kappe/ and click on -pano-

As you can see no error message, only the SPi-v logo with over it a small square.
-------------------------------------------------------------------------------------
HTML doc...

-------------------------------------------------------------------------------------
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<object id="SPi-V_object" classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase=
"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"
width="100%" height="100%" >

<param name="src" value="dswmedia/SPi-V.dcr">
<param name="swURL" value="huisxml.xml">
<param name="swStretchStyle" value="stage">
<param name="swRemote" value="swContextMenu='FALSE'">
<param name="progress" value="true">
<param name="logo" value="false">
<param name="bgColor" value="#000000">

<embed name="SPi-V_object" width="100%" height="100%" type="application/x-director"
pluginspage="http://www.macromedia.com/shockwave/download/"
src="dswmedia/SPi-V.dcr" swURL="huisxml.xml" swStretchStyle="stage" swRemote="swContextMenu='FALSE'"
progress="true" logo="false" bgColor="#000000">
</embed>

</object></body>
</html>

-------------------------------------------------------------------------------------
XML doc...

This version contains the <panoelement> self closing tag, I also used the
</panoelement> closing tag however same results.

-------------------------------------------------------------------------------------

<?xml version="1.0"?>
<tour>
<scene id="scene_huis.jpg">
<panoelement id="pano_huis.jpg" image="image_huis.jpg" />
<image id="image_huis.jpg">
<layer class="base" type="bitmap" src="huis.jpg" />
</image>
</scene>
</tour>

-------------------------------------------------------------------------------------

It's hard to find XML-examples for the SPi-v engine on the www, so if anybody wants to share
some examples please post them.
tkappe
 
Posts: 9
Joined: Wed Jul 12, 2006 8:38 am
Location: Netherlands

Postby Bert on Tue Jul 18, 2006 8:44 am

It maybe a "path" error....

I suggest you make all the file references absolute, so:

"/huisxml.xml"

and "/image_huis.jpg"

if they are in the root...

Of course there are samples in the gallery: http://www.360rage.com/panorama-gallery.php
and on http://www.bali3d.com
User avatar
Bert
Site Admin
 
Posts: 88
Joined: Fri Jun 09, 2006 2:20 pm
Location: Bali, Indonesia

Postby tkappe on Tue Jul 18, 2006 9:35 am

Thanks Bert,

I will try it later on.

With examples I mean the contents of a XML-file.

- Simple XML code files refering to 1 or 2 JPG files with a toolbar for example.
- Complex XML code with spotmetering and ADR 'blending'.

Just to get an idea how to start with XML and the SPi-v engine.
These examples are hard to find on the www.

T :arrow:
tkappe
 
Posts: 9
Joined: Wed Jul 12, 2006 8:38 am
Location: Netherlands

Postby Bert on Tue Jul 18, 2006 10:15 am

True, not so many samples....

This is what I use in the 360 rage gallery, for instance...

Code: Select all
<?xml version="1.0"?>
<tour>
<global>
<uigroup id="scriptlet#autopan">
<ramp id="scriptlet#autopan-start" duration="5" interrupt="press,key" active="true" loop="true">
<behavior>
<action event="loop" type="setProperty" target="_camera"   property="panspeed"  value='0.5' />
</behavior>
</ramp>
</uigroup>
</global>
  <scene id="panos/ptpano-13.jpg">
    <meta>
      <title>panos/ptpano-13.jpg</title>

      <defaultview pan="0" tilt="0" />
      <description>panos/ptpano-13.jpg</description>
    </meta>
    <panoelement id="PT-panos/ptpano-13.jpg" image="panos/ptpano-13.jpg" />
    <image id="panos/ptpano-13.jpg">
      <layer class="base" type="bitmap" src="panos/ptpano-13.jpg" />
    </image>
  </scene>

</tour>
User avatar
Bert
Site Admin
 
Posts: 88
Joined: Fri Jun 09, 2006 2:20 pm
Location: Bali, Indonesia

Postby tkappe on Tue Jul 18, 2006 10:01 pm

Sorry Bert the absolute references are not working.
I don't get it!

If I'm looking at your example I can not find the difference.
Do you place your files in a (special) dir.?
I read that Shockwave uses a dir. called 'dswmedia'
I'm using this dir.

Any other suggestion?


Kind regards
T :arrow:
tkappe
 
Posts: 9
Joined: Wed Jul 12, 2006 8:38 am
Location: Netherlands

Postby Bert on Wed Jul 19, 2006 6:07 am

You don't have to use this dir !!!

Suppose you have your files in a directory named "panos" on your server, you just put all files in there, also the dcr file...

And then use "panos/SPi-V.dcr" , "panos/huisxml.xml" and "panos/image_huis.jpg" in your file references....

Should work.... File references should be relative to the location of your html page

The white square with the red cross means "File Not Found"
User avatar
Bert
Site Admin
 
Posts: 88
Joined: Fri Jun 09, 2006 2:20 pm
Location: Bali, Indonesia

Postby Bert on Wed Jul 19, 2006 6:27 am

Ah...

http://members.chello.nl/t.kappe/huis.jpg

Thats the file !!!

This:
Code: Select all
<panoelement id="pano_huis.jpg" image="image_huis.jpg" />
<image id="image_huis.jpg">
<layer class="base" type="bitmap" src="huis.jpg" />


is wrong !!

it should be this:


Code: Select all
<panoelement id="pano_huis.jpg" image="huis.jpg" />
<image id="huis.jpg">
<layer class="base" type="bitmap" src="huis.jpg" />
User avatar
Bert
Site Admin
 
Posts: 88
Joined: Fri Jun 09, 2006 2:20 pm
Location: Bali, Indonesia

Postby tkappe on Wed Jul 19, 2006 8:13 am

Bert,

If I understand it correctly:
- The 'image' part in <panoelement> is refering to huis.jpg. (image file)
- The 'scr' part in <layer> is refering to huis.jpg.

But how about the 'image id' is this also refering to huis.jpg?
Or do I have to interper it as 'id' in <image>?
Is it that 'id' is more then only a unique name within the xml file?

I see it back in your example, you use 'panos/ptpano-13.jpg' for:

- <scene id> panos/ptpano-13.jpg *
- <title> panos/ptpano-13.jpg
- <description> panos/ptpano-13.jpg
- <image> panos/ptpano-13.jpg
- <image id> panos/ptpano-13.jpg *
- <scr> panos/ptpano-13.jpg

Only in the 'id' part in <panoelement> you use PT-panos/ptpano-13.jpg

T :arrow:
tkappe
 
Posts: 9
Joined: Wed Jul 12, 2006 8:38 am
Location: Netherlands

Postby Bert on Wed Jul 19, 2006 5:27 pm

The id's have to be different that's why....

Only the "src" refers to the actual file, I think :)

The image is "held" in the "image id"

And the panoelement's "image" refers to the image id.

My id's all look a bit the same because I made a quick and dirty CMS ...
User avatar
Bert
Site Admin
 
Posts: 88
Joined: Fri Jun 09, 2006 2:20 pm
Location: Bali, Indonesia

Postby tkappe on Fri Jul 21, 2006 12:00 am

It's running!! :D

After finding a typo ('scr' i.s.o. 'src' :oops: ) I thought I found it but still...
Playing with the reference variables I came to this final WORKING result:

------------------------------------------------------------------------------------
pano.html
------------------------------------------------------------------------------------

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<object id="SPi-V_object" classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase=
"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"
width="100%" height="100%" >

<param name="src" value="SPi-V.dcr">
<param name="swURL" value="dswmedia/huis2.xml">
<param name="swStretchStyle" value="stage">
<param name="swRemote" value="swContextMenu='FALSE'">
<param name="progress" value="true">
<param name="logo" value="true">
<param name="bgColor" value="#000000">

<embed name="SPi-V_object" width="100%" height="100%" type="application/x-director"
pluginspage="http://www.macromedia.com/shockwave/download/"
src="SPi-V.dcr" swURL="dswmedia/huis2.xml" swStretchStyle="stage" swRemote="swContextMenu='FALSE'"
progress="true" logo="false" bgColor="#000000">
</embed>
</object>
</body>
</html>

------------------------------------------------------------------------------------
huis2.xml
------------------------------------------------------------------------------------

<?xml version="1.0" encoding="iso-8859-1"?>
<tour>
<scene id="abc">
<panoelement id="cba" image="xyz" />
<image id="xyz">
<layer class="base" type="bitmap" src="huis.jpg" />
</image>
</scene>
</tour>

------------------------------------------------------------------------------------

It looks simple now, but belief me...

As you can see I kept the 'dswmedia' <DIR> you need it when you working off-line a webserver (on your own PC).
On a website you can name the <DIR> whatever you like.

I hope many SPi-v newbies will benefit from this subject.

Bert many thanks for the help you offered... without you I still...

T :arrow:
tkappe
 
Posts: 9
Joined: Wed Jul 12, 2006 8:38 am
Location: Netherlands


Return to Displaying Panoramas on the Web

Who is online

Users browsing this forum: No registered users and 1 guest