Sie sind nicht angemeldet.

1

Dienstag, 22. Februar 2011, 04:51

How to use javascript to switch the embeded krpano?

Hi Experts overhere, *smile*

I need your help. I don't know how to use javascript to switch the embeded krpano?


Let see my case (http://www.minkeystudio.com/krpano/) *g*

Firstly, I try to explain my situation, I just use the following script to embed the krpano into my website.

<script src="vr1/test1.js"></script>
<div id="pano" style="width:850px; height:400px;">
<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>
<script>
embedpano({swf:"vr1/test1.swf", xml:"vr1/test1.xml", target:"pano"});
</script>

Then, I want to use the buttons (on the bottom) to change another krpano.
Now it support both pc and iphone/ipad. So I cannot just change the swf file.

I wannna know if it is possible to switch upper krpano without refresh/reload the page ? *confused*


Best Regards and Thanks, *love*
MInkey

ciul

Schüler

Beiträge: 149

Wohnort: Colombia

Beruf: Creative developer guy

  • Nachricht senden

2

Dienstag, 22. Februar 2011, 17:55

Hi minkey.

You shall take approach from the krpano javascript interface, and for changing pano, just call loadpano(pano.xml) from a button in the website.

You would amaze how simple it is, reach documentation.

Best regards,
Ciul

3

Mittwoch, 23. Februar 2011, 03:01

Dear Ciul,

Thanks your tips. I found some examples from krpano.com (http://krpano.com/examples/javascript1/).
The case is very close my situation. Now I am studying the syntax of loadpano().


Thanks you very much.
Minkey.