![]() |
|
|
|
|
|
||||||||||
|
| User list | Rules | You are not logged in.
is there a way that besides the thumbnails within the pano i can call a pano with htmlcode like
<a href="" onclick="mainloadpano(virtualtour8.xml); return false;">Open thumbnail 8</a>
this would be a super cool function for me so any help would be much appreciated
Offline
I'm not sure I understand - where would this code be placed? In your HTML page?
Perhaps this is what you seek?:
http://krpano.com/plugins/userplugins/swfaddress/#top
Or this?:
http://krpano.com/docu/js/#top
http://krpano.com/examples/10812/exampl … dpano.html
Last edited by mediavets (2013-02-05 13:00:26)
Offline
yes
http://krpano.com/examples/10812/exampl … dpano.html
this is exactly what i mean, now i just have to take a look how i implement this
Offline
frankvdh wrote:
yes
http://krpano.com/examples/10812/exampl … dpano.html
this is exactly what i mean, now i just have to take a look how i implement this
According to this doc page - see Examples section:
http://krpano.com/docu/js/#top
This is one of the examples included in the download package in the folder "examples/javascript-interface/".
Offline
strange error, i even copied the complete html and every attached file of the demo but for some reason i get the error
Object #<HTMLEmbedElement> has no method 'call'
anyone encountered that problem ?
the code is
<script>
// <![CDATA[
embedpano({swf:"test/virtualtour.swf", id:"krpanoSWFObject", xml:"virtualtour1.xml", target:"krpanoDIV", width:"516", height:"300"});
function krpano()
{
return document.getElementById("krpanoSWFObject");
}
function loadpano(xmlname)
{
krpano().call("loadpano(" + xmlname + ", null, MERGE, BLEND(1));");
}
// ]]>
</script>see preview online http://server.active-vision.nl/test/testpanobuiten.html
Last edited by frankvdh (2013-02-05 14:13:30)
Offline
Strange you placed your swf into a test folder.... where as the xml data drivers are outside..
Try taking it out...
Destiny..
Offline
well i first tryed it localhost, so thats the test folder and then i put it online so the code might be different then the link
de pano works, only the javascript loadpano doesnt because of the call functions
Offline
frankvdh wrote:
well i first tryed it localhost, so thats the test folder and then i put it online so the code might be different then the link
de pano works, only the javascript loadpano doesnt because of the call functions
I don't know if this is relevant, but you must have an entry in the Restricted domains field in order for advanced javascript stuff to work:
Offline
I guess I should have worked as you have it... Did you upload your swfkrpano.js file...
Destiny...
<script src="../../../swfkrpano.js"></script>
<script>
// <![CDATA[
embedpano({swf:"../../../krpano.swf", id:"krpanoSWFObject", xml:"pano1.xml", target:"krpanoDIV", width:"516", height:"300"});
function krpano()
{
return document.getElementById("krpanoSWFObject");
}
function loadpano(xmlname)
{
krpano().call("loadpano(" + xmlname + ", null, MERGE, BLEND(1));");
}
// ]]>
</script>
Offline
yes else the pano wouldnt show.. so everything works form the script, except the call function, so thats why i was so amazed
Offline
mediavets wrote:
frankvdh wrote:
well i first tryed it localhost, so thats the test folder and then i put it online so the code might be different then the link
de pano works, only the javascript loadpano doesnt because of the call functionsI don't know if this is relevant, but you must have an entry in the Restricted domains field in order for advanced javascript stuff to work:
so i need to select this to be able to use this function ? of is it that i leave it blank all domains works for it ?
Offline
Did you provide the target to the "krpanoDIV".. in your html...
<div id="krpanoDIV" style="width:100%; height:100%;"><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>
Destiny..
Offline
@destiny
yes, if it didnt then this
embedpano({swf:"../../../krpano.swf", id:"krpanoSWFObject", xml:"pano1.xml", target:"krpanoDIV", width:"516", height:"300"});
wouldnt show.. so that works
i really think its the call function, since chrome javascript console gives an error everytime that functions is called
Offline
Hi... Did you add the onclick="loadpano('pano1.xml');
Destiny...
<body>
<center>
<br/>
<table style="width:516px; height:auto; border:0;">
<tr>
<td colspan="2" style="height:100%">
<div id="krpanoDIV" style="width:100%; height:100%;"><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>
<tr>
<td>
click the image to load the pano...<br/>
<img src="thumb1.jpg" width="256" height="128" onclick="loadpano('pano1.xml');" />
</td>
<td>
click the image to load the pano...<br/>
<img src="thumb2.jpg" width="256" height="128" onclick="loadpano('pano2.xml');" />
</td>
</tr>
</table>
</center>
<script src="../../../swfkrpano.js"></script>
<script>
// <![CDATA[
embedpano({swf:"../../../krpano.swf", id:"krpanoSWFObject", xml:"pano1.xml", target:"krpanoDIV", width:"516", height:"300"});
function krpano()
{
return document.getElementById("krpanoSWFObject");
}
function loadpano(xmlname)
{
krpano().call("loadpano(" + xmlname + ", null, MERGE, BLEND(1));");
}
// ]]>
</script>
</body>
</html>
Offline
@destiny yes
the onclick calls the loadpano function
and the loadpano function calls the call function..
so the bug is in the loadpano function
basicly it say that the callfunction doesnt exist and cant perform it
this
view-source:http://server.active-vision.nl/test/testpanobuiten.html
is an 100% copy of the example
http://krpano.com/examples/10812/exampl … dpano.html
EXCEPT... for the pano.. thats the only difference
Offline
The krpano demo works my end..... ![]()
Destiny..
Offline
I am assuming you added this file.. swfkrpano.js
Also, it might be a case that it only works with he updated file...
Destiny..
Offline
Hi.. you will find that yours doesn't work due to missing urls or missing files..
http://server.active-vision.nl/test/testpanobuiten.html
Destiny..
Offline
@destiny
the only files that are missing are the 2 images, but that has no connection to the call function does it
and even when i fix that.. it doesnt help
so checkup
swfkrpano.js 100% copy of demo
html 100% copy of demo
images 100%copy of demo
pano not
so i think there is the problem not in the xml files
Offline
Perhaps change your JavaScript from loadpano to loadvirtualtour
You also need to add your thumb jpg files..
Destiny..
Offline
frankvdh wrote:
mediavets wrote:
I don't know if this is relevant, but you must have an entry in the Restricted domains field in order for advanced javascript stuff to work:
so i need to select this to be able to use this function ?
I believe so.
Offline
I have tried to find reference to this in the advanced js but its not in the tour..
I have made a test too.. Same issue.. http://members.westnet.com.au/dps/advan … tiny2.html
It might be that fact that I created mine using ptp and which creates the xml code very differently..
Worth investigating more..
Destiny..
Offline
well, yours gives me the same error
Offline
Yes.. As you say, its not right yet.. Still working it out.. What seems to be simple isn't..
I think its the makeup of the xml and swf.. I will try to make a demo tour up again but use krpano.. There might be something written into the swf that makes it work since there are flash issues with it as it is when created using ptp.....
Destiny..
Offline
its a difficult problem and i agree with you thats it something between de xml and swf, i gonna try the restricted domains function maybe that wil help. if you find the problem let me know, but id like to thank you for your help and replies so far, much appreciated
Offline
Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
|
CHOOSING KOLOR Why choose Kolor? Which solution to choose? Download a trial Where can I buy? Education |
SOFTWARE Autopano Pro Autopano Giga Panotour Panotour Pro XnView |
ACCESSORIES Training DVD Panobook PROJECTS Paris 26 Gigapixels Yosemite 17 Gigapixels |
COMMUNITY Forums YouTube channel Google+ |
COMPANY Blog About Kolor Resellers Contact Visit us |
PRESS Press center Press review TOOLS My account |
