You are not logged in.

1

Sunday, May 17th 2009, 9:12pm

where to write the name of the galleryfile.

Hello Guys!

I am a beginner with this and have made the plugin to load into krpano, but when I create the as3Thumbsforkrpano.swf it says "Looks like there was an error loading the XML" . I have just one problem, where do I change the name of the xml file in the flashscript. I have tried, see below... :-) with the name Gallery1.xml


//xml load variables
var xmlLoader:URLLoader;
var xmlData:XML;

//xml load function
function loadXml(xmlFile:String):void {
try {
xmlLoader= new URLLoader();
xmlData = new XML;
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlLoadFail);
xmlLoader.load(new URLRequest(xmlFile));
} catch (error:Error) {
//catch errors
trace("error loading xml");
}
}
//load the XML file, change to any name you like.

// ++++ changed to load by URL
var TheXML = root.loaderInfo.parameters.TheXML;


loadXml("gallery1.xml+?nocache="+getTimer());

function xmlLoadFail(event:IOErrorEvent):void {
trace("Looks like there was an error loading the XML");
}

//we have our XML data, so lets load the thumbnails
function xmlLoaded(e:Event):void {
xmlData = XML(xmlLoader.data);
loadThumbs();//call the thumbs loading function


Thanks for all the help i can get.


/Per

Tuur

Sage

Posts: 3,120

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Sunday, May 17th 2009, 11:26pm

yo,

i have this in the main xml of the tour:

Source code

1
2
3
4
5
6
7
8
9
<plugin name="thumbnails" url="as3Thumbsforkrpano.swf?TheXML=gallery1.xml"
        align="leftbottom"
        keep="true"
		x="270"
  	        y="-203"
			scale="0.9"
			zorder="100"
			
        />



when u change the file name of the file 'gallery1.xml' to 'thekrpanobarisopen.xml you should also do that in the plugin as shown above in this part :'
url="as3Thumbsforkrpano.swf?TheXML=gallery1.xml" to url="as3Thumbsforkrpano.swf?TheXML=thekrpanobarisopen.xml"


is this what u mean??

why do you want to change it in the source??

Cheers

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

3

Tuesday, May 19th 2009, 6:34pm

Hello Tuur!

Thanks for the help. Now it works just apart from that the thumbnails does not load. How do you write the path to the folder where I put it (its just one test). My folder resides in the same folder as the gallery1.xml file. See quote below.

Question #2 I have marked the text "text to show" green. I that the right place to put the text about the thumbs?

Is there some documentation about this, I am new to xml!


<?xml version="1.0" encoding="utf-8"?>

<images>
<thumboptions>
<ScrollSpeed>25</ScrollSpeed>
<thumbW>140</thumbW>
<ThumbPadding>20</ThumbPadding>
<ShownThumbs>5</ShownThumbs>
<ThumbOffset>-100</ThumbOffset>
<thumbH>70</thumbH>
<InitialAlpha>.2</InitialAlpha>
<font_type>Wide Latin</font_type>
<font_size>15</font_size>
<font_alpha>1</font_alpha>
<font_color>0xffffff</font_color>
</thumboptions>

<pic>
<thumb>thumbs/per.jpg</thumb>
<panoToLoadXml>s1</panoToLoadXml>
<about><![CDATA[Text To Show]]></about>
</pic>

</images>

Many thanks in advance!

Per

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

4

Tuesday, May 19th 2009, 7:11pm

Per, do you have a link i can take a look at?

that should work if your file is in


gallery1.xml
krpano.swf
krpano.xml
|
-------thumbs
|
------------ per.jpg

5

Wednesday, May 20th 2009, 7:47pm

Hello!

I just work local on my computor, but here is a screendump of how it looks on my mac.
/Per
Per Nylén has attached the following image:
  • Bild 1.png

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

6

Thursday, May 21st 2009, 7:50am

that's weird, that should work... if you use firefox try getting firebug and see if you get any 404 errors.

7

Thursday, May 21st 2009, 8:55am

I am fairly new at this so please excuse me if I am way off base.

I noticed on your screen dump it showed the file as per2.jpg with the # 2 as part of the file name. In your xml it refers to per.jpg without the 2.

Hope I helped. If not, sorry.



Jarredja

8

Thursday, May 21st 2009, 10:34am

Thanks Jarredja!

It was that little #2. :-)

/Per *g*

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

9

Friday, May 22nd 2009, 12:38am

hahaha, how did we miss that ? :P I didn't noticed either :(