You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

1

Sunday, July 17th 2011, 12:55am

Separate XML for Flash and Ipad / Ipod (html 5)

Hello I am new to this ipad /ipod thing Got it to work but not entirely. I have some questions hope you guys can help

1.How do you build your tours so that it runs both on flash and html5? I saw in the documentation isphone , ispad . I think it's too messy to have all this conditions in 1 xml. Do you have just 1 single xml for everything?


2.Can I just create separate xmls for flash and apple devices?


how do i do something like this

if(isipad)
include ipad.xml
if(isphone)
include iphone.xml
if(isflash)
include tour.xml

My problem is when I try to load my xml I get "loading or parsing failed" . The xml is basically the one generated by MAKE VTOUR (MULTIRES) droplet.bat and edited to add my skin, scrolling thumbnails etc.
</include></include></include>
If I use the default xml produced by the make vtour and run it under apple mode it works.


Thanks,
Milo

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

2

Monday, July 18th 2011, 12:32pm

I will answer my own question. haha

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<div id="krpanoDIV">
<noscript><table style="width:100%;height:100%;"><tr style="valign:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
</div>

<script src="tour.js"></script>

<script>

var viewer = createPanoViewer({swf:"tour.swf", id:"krpanoSWFObject", target:"krpanoDIV"});

//viewer.useHTML5("whenpossible");// incomment to use the HTML5 krpanoJS viewer always when possible (Safari5)

if( viewer.isDevice("iPhone|iPod|Andriod") )
  viewer.addVariable("xml", "mtour.xml");
else if( viewer.isDevice("iPad") )
  viewer.addVariable("xml", "ptour.xml");
else
  viewer.addVariable("xml", "tour.xml"); 
viewer.embed();

</script>


I saw it here. Didn't search hard enough the first time.

http://www.krpano.com/forum/wbb/index.ph…d&threadID=5424

3

Monday, July 18th 2011, 1:33pm

Hi,

right, either that, or use the 1.0.8.14 version and the devices setting,

e.g. that would be also a possibility:

Source code

1
2
3
4
5
<krpano>
  <include url="mtour.xml" devices="mobile" />
  <include url="ptour.xml" devices="tablet" />
  <include url="tour.xml" devices="desktop" />
</krpano>


best regards,
Klaus

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

4

Tuesday, July 19th 2011, 5:20am

WOHOOOOOO new features! THANKS klaus!