You are not logged in.

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

1

Wednesday, December 23rd 2009, 11:58am

hospots in a upper windows according to an above window

in this exemple: http://www.spheerique.com/spheros//visit…l2fenetres.html
I use 2 windows in a html file:


<script type="text/javascript">
// <![CDATA[
if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
{
var so = new SWFObject("krpano.swf", "krpanoSWFObject", "100%", "300", "9.0.28","#000000");
so.addParam("allowFullScreen","true");
so.addVariable("pano", "testfenetre0bis.xml");
so.useExpressInstall("swfobject/expressinstall.swf");
so.setAttribute('xiRedirectUrl', window.location);
if ( so.write("krpano") ) { var macmousewheel = new SWFMacMouseWheel(so); }
}
else
{
document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
}
// ]]>

</script>
<script type="text/javascript">
// <![CDATA[
if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
{
var so = new SWFObject("krpano.swf", "krpanoSWFObject1", "100%", "500", "9.0.28","#000000");
so.addParam("allowFullScreen","true");
so.addVariable("pano", "testfenetre2.xml");
so.useExpressInstall("swfobject/expressinstall.swf");
so.setAttribute('xiRedirectUrl', window.location);
if ( so.write("krpano2") ) { var macmousewheel = new SWFMacMouseWheel(so); }
}
else
{
document.getElementById("krpano2").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
}
// ]]>
</script>

I want the upper window stay the same, and the hotspots change the above pano. according to the hotspot properties lookat etc....

tthe code of the hotspot:
<hotspot name="spot1" hview="-110" vview="0" fovview="90" hcenter="-48.3692" vcenter="14.3706" onclick="set(plugin[data].autorotate,get(autorotate.enabled));set(autorotate.enabled,false);lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100))
;loadpano(testfenetre2.xml,null,null,BLEND(1));lookat(get(hview),get(vview),get(fovview));wait(blend);lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));set(autorotate.enabled,get(plugin[data].autorotate));" url="testfenetredata/graphics/spots/spot0.swf" onhover="showtext(Vuye du bas de L'aqueduc de Roquefavour);" ath="311.631" atv="14.3706"/>

what code do i have to use to make that ???

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Wednesday, December 23rd 2009, 4:50pm

Hi Germain,

This can be done using JavaScript...
Add this code to your html:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script type="text/javascript">
// <![CDATA[
	function krpano1() 
	{
		return document.getElementById("krpanoSWFObject1");
	}

	
	function TalkTo_KrpanoSWFObject1(arg)
	{
		krpano1().call(""+ arg +"");
	}

// ]]>
</script>


Now, you can call the Javascript function TalkTo_KrpanoSWFObject1(arg) from your "up_krpano" (krpanoSWFObject) to execute some action (the args you gives to the function) in your "down_krpano" (krpanoSWFObject1)....
For example, you can call that function inside the onclick of your hotspot:

Source code

1
2
3
	<hotspot name="spot0" onclick="js(TalkTo_KrpanoSWFObject1(loadpano(PANO_TO_BE_LOADED.xml)));" 
	url="spot0.swf" onhover="showtext(Vue 360° du Moulin);
	" ath="280.64" atv="-0.0552995"/>


SAlut.

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

3

Wednesday, December 23rd 2009, 7:33pm

Michel thank you for your speed, your kindness and your skills, this system suits me better than the iframe window *thumbsup*
Merci Michel pour ta diligence, ta gentillesse et tes compétences, ce systeme me convient mieux que la fenetre iframe *thumbsup*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Wednesday, December 23rd 2009, 7:43pm

Hi Germain,

Merci *rolleyes* ... Compétences toutes relatives (autodidacte grâce à des forums comme celui-ci) ;-) ...

Joyeux Noël *smile* .

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

5

Tuesday, December 29th 2009, 12:06pm

I want also open a html file
I try this code but it doesn't work .!!???

Je veux aussi ouvrir un fichier html
J'ai utilisé ce code, mais cela ne marche pas!!???

js(TalkTo_KrpanoSWFObject1(openurl(../tour%20luthier/visiteluthier.html));"

6

Saturday, January 2nd 2010, 7:57pm

Hi,

what happens when you try the openurl() code? nothing?
the blank (%20) can be maybe a problem, but I'm not sure yet...

best regards,
Klaus

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

7

Saturday, January 2nd 2010, 8:31pm

Hi Germain,

I think the problem is a missing parenthesis ;-) ...
js(TalkTo_KrpanoSWFObject1(openurl(../tour%20luthier/visiteluthier.html)));"

Also, no need to call the javascript here... just call the openurl() directly...
openurl(../tour%20luthier/visiteluthier.html);

SAlut.

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

8

Sunday, January 3rd 2010, 7:48pm

Thank you Klaus and Michel it was the parentis and also "allow popus on firefox"
The problem now is that the html page appeérs, but in a full page and not in the above window ???

Merci Klaus et Michel c'était en effet une histoire de parenthèse, at aussi de ne pas avoir autorisé les popups de firefox.
A présent le probleme est que je n'ai pas ma page dans la petite fenètre du bas, mais en plein écran! ??????

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

9

Monday, January 4th 2010, 4:56pm

Hi Germain,

I think you have to use AJAX to be able to change the content of your DIV...
I have found this as a possible solution: http://www.dhtmlgoodies.com/index.html?page=ajax
inside this page, look at the Ajax - dynamic content example... Perhaps this can be a way to do...
Another way would be, instead of doing your different parts using DIVs, rebuild your page using FRAMESETs as your different parts...

Also, remarks that when you change your DIV content from Krpano to some html, then you can not call Krpano actions as loadpano(X) any more (obvious *rolleyes* )... You will have to know if krpano exist to receive actions, and if not, reload it...

Anyway, not an impossible thing to do but not simple....

SAlut.

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

10

Thursday, January 7th 2010, 2:45pm

Thank you Michel .It's not simple !!! *cry*
So I will use the xml to call my panos !

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

11

Sunday, January 31st 2010, 12:01pm

When I open my web page on another computer, it works well.
But by copying the files, I have the first page that opens with 2 windows, but when I click on the hotspots, pano does not appear in the window below.
Ditto on all computers (xp and vista) except the principal.

Quand j'ouvre ma page web sur un autre ordinateur, cela fonctionne bien.
Mais en copiant les fichiers, j'ai la première page qui s'ouvre avec les 2 fenetres, mais quand je clique le hotspots le pano ne s'affiche pas dans la fenetre inférieure.
Idem sur tout les ordinateurs (xp et vista) excepté le principal.


<html>
<head>
<title>Visite 2 fenetres</title>
</head>
<style>
body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
* html, * html body{ overflow: hidden; }
a{ color:#AAAAAA; text-decoration:underline; }
a:hover{ color:#FFFFFF; text-decoration:underline; }
</style>
<body>

<div id="krpano" xstyle="float:left;">
<noscript><table width="100%" height="100%"><tr
valign="middle"><td><center>ERROR:<br><br>Javascript
not
activated<br><br></center></td></tr></table></noscript>
</div>
<div id="krpano2" xstyle="float:left;">
<noscript><table width="100%" height="100%"><tr
valign="middle"><td><center>ERROR:<br><br>Javascript
not
activated<br><br></center></td></tr></table></noscript>
</div>
</td>
</tr>
</tbody>
</table>
</center>
<script type="text/javascript" src="swfobject/swfobject.js"></script>
<script type="text/javascript" src="swfobject/swfmacmousewheel.js"></script>


<script type="text/javascript">
// <![CDATA[
function krpano1()
{
return document.getElementById("krpanoSWFObject1");
}


function TalkTo_KrpanoSWFObject1(arg)
{
krpano1().call(""+ arg +"");
}

// ]]>
</script>

<script type="text/javascript">
// <![CDATA[
if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
{
var so = new SWFObject("krpano.swf", "krpanoSWFObject", "100%", "60%", "9.0.28","#000000");
so.addParam("allowFullScreen","true");
so.addVariable("pano", "minitest2.xml");
so.useExpressInstall("swfobject/expressinstall.swf");
so.setAttribute('xiRedirectUrl', window.location);
if ( so.write("krpano") ) { var macmousewheel = new SWFMacMouseWheel(so); }
}
else
{
document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
}
// ]]>

</script>
<script type="text/javascript">
// <![CDATA[
if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
{
var so = new SWFObject("krpano.swf", "krpanoSWFObject1", "100%", "40%", "9.0.28","#000000");
so.addParam("allowFullScreen","true");
so.addVariable("pano", "minitest0.xml");
so.useExpressInstall("swfobject/expressinstall.swf");
so.setAttribute('xiRedirectUrl', window.location);
if ( so.write("krpano2") ) { var macmousewheel = new SWFMacMouseWheel(so); }
}
else
{
document.getElementById("krpano2").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
}
// ]]>
</script>
</body></html>

hotspot:

<hotspot name="spot0" hview="100" vview="90" fovview="20" hcenter="160" vcenter="0"
onclick="lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100));
js(TalkTo_KrpanoSWFObject1(loadpano(minitest5.xml,null,null,BLEND(1))));"
url="minitestdata/graphics/spots/spot0.swf" onhover="showtext(Notre Dame de la garde);" ath="513" atv="-1.5"/>

Tuur

Sage

Posts: 3,193

Location: Netherlands

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

  • Send private message

12

Sunday, January 31st 2010, 4:02pm

GREAT!!

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

germain

Trainee

  • "germain" started this thread

Posts: 53

Location: MARSEILLE FRANCE

Occupation: PANOPHOTOGRAPHE

  • Send private message

13

Monday, February 1st 2010, 8:47am

Thank you Tuur, but what's about my problem?

This post has been edited 1 times, last edit by "germain" (Feb 1st 2010, 9:06am)