PDA

View Full Version : panoName with xml


behrda
05-21-2007, 10:07 AM
Hallo together,
I have a problem with the xml File in which I wrote the panoName.
Here are my codes:
in my flash-File:

var panorama:MovieClip;
var loader:Loader = new Loader();
loader.load(new URLRequest("files/pano.swf"));
addChild(loader);

loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);

function loadComplete (e:Event) {
swapChildren(loader, border);
panorama = loader.content;
panorama.setArea(100,50,400,300);
panorama.loadPanorama("pano.swf?xml_file=pano.xml");


}

in my xml File:

<?xml version="1.0" encoding="ISO-8859-1"?>

<params>

<param name="panoName" value="images/test" />
<param name="loaderText" value="" />
<param name="loaderBackColor" value="#000000" />
<param name="loaderConsecutive" value="1" />

<param name="panHome" value="-155" />
<param name="tiltHome" value="10" />
<param name="zoomHome" value="0.9" />

</params>

and now my errors while compiling it in flash:
Load 0: pano_f.jpg
Load 1: pano_r.jpg
Load 2: pano_b.jpg
Load 3: pano_l.jpg
Load 4: pano_u.jpg
Load 5: pano_d.jpg
Error #2035: The URL was not found. URL: .../examples/pano_f.jpg
Error #2035: The URL was not found. URL: .../examples/pano_r.jpg
Error #2035: The URL was not found. URL: .../examples/pano_b.jpg
Error #2035: The URL was not found. URL: .../examples/pano_l.jpg
Error #2035: The URL was not found. URL: .../examples/pano_u.jpg
Error #2035: The URL was not found. URL: .../examples/pano_d.jpg

My flash-File is in the directory: .../examples
and my jpg-Files in the directory: .../examples/images

I donґt understand why it search in the .../examples directoy and not in the .../examples/images.
Can anybody explain me how to handle with xml-Files in there?
Thanx Dario

Denis
05-23-2007, 04:33 AM
Actually, version 2.0 and higher uses another format for parameters, check examples folder or documentation for panorama parameters.

<?xml version="1.0" encoding="ISO-8859-1"?>
<panorama>
<parameters>
panoName=images/test
loaderText=""
loaderBackColor=#000000
loaderConsecutive=1
</parameters>
</panorama>

Sorry for inconvenience.

behrda
05-24-2007, 09:56 AM
Thanks!
Itґs running fine!
Now I love to work with it :D
Great work!
Dario

neil
05-30-2007, 05:37 AM
It looks like you have found the more recent method for scripting, but I think the reason your original script was failing is because you used three dots to indicate a different directory level ".../" where you should have used two dots "../" - Neil :wink: