View Full Version : Pan/tilt/zoom on hotspot from Html
merlinos
03-22-2009, 07:58 AM
Hi all,
sorry if my question is a nut one, but I'm newbie on FPP and I want to know if it's possible to "center" pano on a hotspot via html.
What does it mean...... I have an html with the list of hotspot. When I click one, I want the pano to pan, tilt and zoom on this hotspot.
Best regards...
allSaints
03-22-2009, 09:56 AM
Hi merlinos,
The pano is controlled by an XML file, and in that file you can for example specify the setting that you want to use when the pano is initiated.
The file below is a stripped example of an FPP XML file:
<?xml version = '1.0'?>
<panorama>
<parameters>
zoomHome = 1
panHome = 8
tiltHome = 0
friction = 0.90
segments = 30
qualityStatic = high
qualityMotion = low
qualityStatic2 = high
qualityMotion2 = low
layer_1 = ../glassMeter.swf
layer_2 = ../tooltips.swf
layer_3 = ../hotspots.swf
layer_4 = ../menuFullscreen.swf
</parameters>
<hotspots>
<global>
<spot id="FSbutton" url="../img/full.png" alt="Fullscreen on/off" static="1" salignX="-0.47" salignY="-0.46" scale="1" alpha="0.65" onClick="fullscreen(-)" />
</global>
</hotspots>
</panorama>
And in your HTML file - where you embed your pano - the name of the XML file is given:
<script type="text/javascript" src="../swfobject.js"></script>
<script type="text/javascript" >
var flashvars = {
panoName: "pano1",
xml_file: "pano1.xml"
};
var params = {
allowscriptaccess: "always",
allowFullScreen: "true"
};
var attributes = {
id: "movie20"
};
swfobject.embedSWF("../pano.swf", "flashcontent", "100%", "100%", "9.0.0", false, flashvars, params, attributes);
</script>
Regards,
Tommy
izoneguy
03-22-2009, 12:50 PM
Take a look at these examples:
http://langebilder.de/__Flashpanotest/flashpanoramas/examples/#navigation
merlinos
03-22-2009, 06:53 PM
Hi guys.....thanks for quick replies!!! :p
I think we misunderstood....:???: What I need is moving "camera" on a specified hotspot when you click on an hypertext from an html.
I mean, i have the list of my hotspot in an html page (and not in my pano) and my pano in a ifram (or lightbow or whatever!!) in the same html.
So if I click on the fountain text, i want my pano to pan, tilt and move on the fountain in the pano.
Sorry for my poor english.......:???:
allSaints
03-22-2009, 08:14 PM
OK merlinos,
I think I see now what you mean.
Take a look at this page (http://flashpanoramas.com/blog/2007/05/23/add-some-life-to-panoramas/) at the flashpanoramas blog - he uses simple javascript to execute FPP commands.
And I use it on this page: http://wirestam.com/panos/Flash/eniro/eniro1_old.html (press the link "What time is it?")
Tommy
merlinos
03-22-2009, 08:38 PM
Thanks Tommy! This is exactly what i need...... now, I need someone to tell me how to do that!!! :rolleyes:
allSaints
03-22-2009, 08:53 PM
merlinos,
the keyword is ExternalInterface API.
In the examples above, look in the page source after the prefix "live" and how it is used.
Then in your XML file set it like this:
<hotspots>
<global
onStart="externalInterfaceID=live"
Of course you can use any prefix you like...
Tommy
GregorH
03-22-2009, 10:52 PM
...and your link should look like this:
<a href="javascript:window.document.pano.livePanoExecute('l oadPano(panoName=yourpanoname&pan=103&tilt=-10);global.onTransitionEnd=setFov3();')">Your link name</a>
regards,
Gregor
merlinos
03-23-2009, 11:53 AM
Thanks a lot!!! :p
Quicker than that is impossible!!! now I'm going to try ..... so dont go away too far....i think i will need your help again! :D
christophe
03-23-2009, 03:42 PM
Hi,
I think that you have to know that it only works on line. If you test it on local, it should'nt works. euh, i think ...!
allSaints
03-23-2009, 06:42 PM
Nice of you, Christophe, to remind us of that fact. :)
When I started with FPP, I did just that mistake and sat at home pulling my hair in despair for two weeks!
Tommy
christophe
03-23-2009, 07:53 PM
I think that it is you who taught it to me ;)...again :)
vBulletin® v3.7.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.