You are not logged in.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

1

Wednesday, November 17th 2010, 5:45pm

ONSTART

Hi,

i like to trigger an action in the onstart intro(); but i want to happen that only when device is desktop else load1();

what is the way to do that??

and i was also wondering how to make a plugin only visible on a specific device... and else ignore..

something like : if device is ipad then load plugin logo 1 else plugin logo 2

Thanx

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

This post has been edited 1 times, last edit by "Tuur" (Nov 17th 2010, 6:23pm)


Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

3

Wednesday, November 17th 2010, 7:03pm

oke got that working..

but..


mmm...

i try this:


<plugin name="info" url="btn_info.png" visible="true" keep="true" align="center" x="0" y="0" scale="1" onclick="set(plugin[info].visible,false)" devices="desktop" />


<plugin name="info2" url="btn_info.png" visible="true" keep="true" align="center" width="80%" height="prop" onclick="set(plugin[info2].visible,false)" devices="iphone | ipad | android | mobile | tablet" />


it seems not to work...

and


i like to trigger an action in the onstart intro(); but i want to happen that only when device is desktop else load1();
http://www.virtualtuur.com
Skype:studiotuur

4

Wednesday, November 17th 2010, 7:20pm

oke got that working..

but..


mmm...

i try this:


<plugin name="info" url="btn_info.png" visible="true" keep="true" align="center" x="0" y="0" scale="1" onclick="set(plugin[info].visible,false)" devices="desktop" />


<plugin name="info2" url="btn_info.png" visible="true" keep="true" align="center" width="80%" height="prop" onclick="set(plugin[info2].visible,false)" devices="iphone | ipad | android | mobile | tablet" />


it seems not to work...

and


i like to trigger an action in the onstart intro(); but i want to happen that only when device is desktop else load1();


Hi Tuur

I don't understant what you want to do !?
For plugin info2 you have visible true and onclick you have to put set(visible, false); ;-)

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

5

Wednesday, November 17th 2010, 7:26pm

i want 'info' load on the desktop only and 'info 2' on the other devices..

so i put devices="...." but in the developper view of safari it doesn't seem to work..

ialso put:


<plugin name="btn_fullscreen" url="btn_fullscreen.png" visible="true" keep="true" align="rightbottom" x="15" y="15" scale="0.8" onclick="switch(fullscreen);" onover="set(plugin[fstext].visible,true)" onout="set(plugin[fstext].visible,false)" devices="desktop"/>

also here it shows the button on the safari developper iphone view..

(have no i device yet.. *sad*

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

6

Wednesday, November 17th 2010, 8:32pm

give me a link, I have an iPad *tongue*

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

7

Wednesday, November 17th 2010, 8:39pm

check PM !!

et Merci!

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

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

8

Wednesday, November 17th 2010, 9:37pm

1001 nights

... ehh posts ;;-)

can i define in xml which action should be done device wise??

so: when iphone load1(): else intro(); ..

or when iphone include xml XXXX else include xml YYY
*question*

i remember something about doing that in the index.html somewhere

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

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

9

Wednesday, November 17th 2010, 10:03pm

ah... found it..

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<script>

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

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

	if( viewer.isDevice("iPhone|iPod|Android") )
		viewer.addVariable("xml", "krpano_mobile.xml");
	else
		viewer.addVariable("xml", "krpano.xml");

	viewer.embed();

</script>

*thumbsup*

Thanx Job1 and Michel..

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

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,111

Location: Netherlands

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

  • Send private message

10

Wednesday, November 17th 2010, 11:09pm

oke next question :

how to protect this all in 1 swf (except the pictures)
*question*

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

11

Friday, November 19th 2010, 10:08am

Hi,
how to protect this all in 1 swf (except the pictures)
you can protected and embed everything in the swf like before,
but for the iPhone/iPad devices all files (xml, images, ...) must be external,
there the .swf file was completely untouched,

best regards,
Klaus