Thomas in your announcement for 2.1, you mentioned that there is now a JavaScript API, and that you would post more info "When I get back" ... Since I see you posting I assume you are back from where ever you managed to get away to, so ... How goes the API documentation??
Cheers.
Javascript API...
Got me.... Here is the JavaScript API. Please note: You should use the newest version of the p2q_embed_object.js file or you can just enable the JavaScript interface in the "normal.ggt" HTML template. You can also see a demo at here.
MfG, Thomas
You just need to change the one line to
or just regenerate a HTML page with the HTML template.
Code: Select all
p2q_EmbedFlashId('pano','test.swf','640','480','allowFullScreen','true','FlashVars','externalinterface=1');
MfG, Thomas
Can you post your code?
MfG, Thomas
It works, I'm sorry it had tested only locally, on the Web if it works.
do you would suggest how I changing the coordinates in numbers as a text like the demo and how I can place one title of pano?
Thanks
http://eneconpalito.com/ramiro/solaris_ ... s_out.html
My code is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title></title>
<script type="text/javascript" src="p2q_embed_object.js">
</script>
<style type="text/css" title="default">
body, div, h1, h2, h3, span, p {
font-family: Verdana,Arial,Helvetica,sans-serif;
color: #000000;
}
body {
font-size: 10pt;
background : #bdbcbc;
}
table,tr,td {
font-size: 10pt;
border-color : #777777;
background : #dddddd;
color: #000000;
border-style : solid;
border-width : 1px;
}
h1 {
font-size: 18pt;
}
h2 {
font-size: 14pt;
}
.warning {
font-weight: bold;
}
</style>
</head>
<body>
<h1></h1>
<p>
<script type="text/javascript">
<!--
function getFlashMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
if ((window.p2q_Version) && (window.p2q_Version>=2.2)) {
var flashvars="";
// enable javascript interface
flashvars+="externalinterface=1&pan=22";
p2q_EmbedFlashId('pano','solaris_out.swf','640','480','allowFullScreen','true','FlashVars','externalinterface=1');
// Check to see if the version meets the requirements for playback
if (!DetectFlashVer(9,0,0)) {
document.write('<p class="warning">This content requires Adobe Flash Player Version 9 or higher. '
+ '<a href="http://www.adobe.com/go/getflash/">Get Flash<\/a><\/p>');
}
} else {
document.writeln('<p class="warning">p2q_embed_object.js is not included or it is too old! Please copy this
file into your html directory.<\/p>');
}
//-->
</script>
<noscript>
<p class="warning">Please enable Javascript!</p>
</noscript>
<br>
<a onClick="pano.moveTo(357,90,70,10);" href="#">Move To 357,90</a>
<a onClick="pano.moveTo(357,-90,70,3);" href="#">Move To 357,-90</a>
<a onClick="pano.moveTo(243,2);" href="#">Move To 234,2</a>
<a onClick="pano.moveTo(173,0);" href="#">Move To 173,0</a>
<a onClick="pano.moveTo(74,-0);" href="#">Move To 743,-0</a>
</body>
</html>
do you would suggest how I changing the coordinates in numbers as a text like the demo and how I can place one title of pano?
Thanks
http://eneconpalito.com/ramiro/solaris_ ... s_out.html
My code is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title></title>
<script type="text/javascript" src="p2q_embed_object.js">
</script>
<style type="text/css" title="default">
body, div, h1, h2, h3, span, p {
font-family: Verdana,Arial,Helvetica,sans-serif;
color: #000000;
}
body {
font-size: 10pt;
background : #bdbcbc;
}
table,tr,td {
font-size: 10pt;
border-color : #777777;
background : #dddddd;
color: #000000;
border-style : solid;
border-width : 1px;
}
h1 {
font-size: 18pt;
}
h2 {
font-size: 14pt;
}
.warning {
font-weight: bold;
}
</style>
</head>
<body>
<h1></h1>
<p>
<script type="text/javascript">
<!--
function getFlashMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
if ((window.p2q_Version) && (window.p2q_Version>=2.2)) {
var flashvars="";
// enable javascript interface
flashvars+="externalinterface=1&pan=22";
p2q_EmbedFlashId('pano','solaris_out.swf','640','480','allowFullScreen','true','FlashVars','externalinterface=1');
// Check to see if the version meets the requirements for playback
if (!DetectFlashVer(9,0,0)) {
document.write('<p class="warning">This content requires Adobe Flash Player Version 9 or higher. '
+ '<a href="http://www.adobe.com/go/getflash/">Get Flash<\/a><\/p>');
}
} else {
document.writeln('<p class="warning">p2q_embed_object.js is not included or it is too old! Please copy this
file into your html directory.<\/p>');
}
//-->
</script>
<noscript>
<p class="warning">Please enable Javascript!</p>
</noscript>
<br>
<a onClick="pano.moveTo(357,90,70,10);" href="#">Move To 357,90</a>
<a onClick="pano.moveTo(357,-90,70,3);" href="#">Move To 357,-90</a>
<a onClick="pano.moveTo(243,2);" href="#">Move To 234,2</a>
<a onClick="pano.moveTo(173,0);" href="#">Move To 173,0</a>
<a onClick="pano.moveTo(74,-0);" href="#">Move To 743,-0</a>
</body>
</html>
Thomas, can I ask why you chose to set a custom flashvar with externalinterface=1 instead of using the built in standard of AllowScriptAccess?
http://kb.adobe.com/selfservice/viewCon ... d=tn_16494
http://kb.adobe.com/selfservice/viewCon ... d=tn_16494
Because this value defines the access in the other direction (from the pano to the HTML). I turned the external interface off by default, to avoid the security error message.Aduffy wrote:Thomas, can I ask why you chose to set a custom flashvar with externalinterface=1 instead of using the built in standard of AllowScriptAccess?
MfG, Thomas
I don't understand..... You can write any text or image between the anchor tag (e.g. <a ... onClick="...">Some Text</a>). You can also use other elements to trigger the javascript code. What do you mean with "how I can place one title of pano"?ramirox3 wrote:It works, I'm sorry it had tested only locally, on the Web if it works.
do you would suggest how I changing the coordinates in numbers as a text like the demo and how I can place one title of pano?
MfG, Thomas
OK. Got you. So we would also need to make sure AllowScriptAccess was enabled as well..thomas wrote:Because this value defines the access in the other direction (from the pano to the HTML). I turned the external interface off by default, to avoid the security error message.Aduffy wrote:Thomas, can I ask why you chose to set a custom flashvar with externalinterface=1 instead of using the built in standard of AllowScriptAccess?
Perhaps instead of (or as well as) setting this in a flasvar at the time of embedding, it could be a check box in pano2vr ??
- Hopki
- Gnome
- Posts: 13039
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi Thomas
Have been playing with the JavaScript API which took some doing as not very good at code.
http://www.hopkimedia.co.uk/Test%20Pano ... Panos.html
It works but with errors on the page, I noticed that your demo does also.
Do you know why there are errors?
It all works fine but looks bad.
Kind regards
Hopki
Have been playing with the JavaScript API which took some doing as not very good at code.
http://www.hopkimedia.co.uk/Test%20Pano ... Panos.html
It works but with errors on the page, I noticed that your demo does also.
Do you know why there are errors?
It all works fine but looks bad.
Kind regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
You should only get those if you start it locally. Do you also get it if you start it from the web page? Can you post a screen shot?Hopki wrote:Do you know why there are errors?
It all works fine but looks bad.
MfG, Thomas