Forums  

Go Back   Forums > Talk > Panorama techniques

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2011, 03:48 PM
thegoodbus thegoodbus is offline
Junior Member
 
Join Date: May 2008
Posts: 9
Downloads: 0
Uploads: 0
Lightbulb Reading and Using Hotspot Values

I have a project where, onClick, I would like to read the pan and tilt of a hotspot and change the pan and tilt of the camera to those values. How do I accomplish this?

I know that XML cannot declare and store variables, and I have investigated the plugins to see if any might help me out. Tommy's panologic and commander plugins interested me for a while, but I could not figure out a creative way to get around the structure of those plugins (which is when x, do y, instead of what I need - what is x, now make y=x).

The probable solution is a plugin that reads the value of something in FPP (the pan and tilt of a hotspot in this case) and then instructs FPP to change something different to that value (in this case the pan and tilt of the camera). Has anyone done this before?

I read a lot on the forums to see what it would take for me to figure out how to write this in Flash (I have access to Flash CS4), but I do not look forward to spending valuable days right now learning this technique (I do not yet know AS3).

Is there a technique in XML or an existing plugin that accomplishes this feature? If not, could someone point me to some helpful AS3 code that will help me build a plugin?

I really appreciate all that you do to help on this forum. I have waited a while before posting this question to be sure I really couldn't find the answer elsewhere or create a workaround of my own. Thank you very much.
Reply With Quote
  #2  
Old 01-06-2011, 04:49 PM
uudu uudu is offline
Senior Member
 
Join Date: Apr 2008
Location: Tallinn, Estonia
Posts: 151
Downloads: 1
Uploads: 0
Default

Do I understand you right? You want the pano turn to some certain point when visitor click on hotspot?
In this case add to your hotspot
onClick="pano.pan=90,800; pano.tilt=30,800"
Reply With Quote
  #3  
Old 01-07-2011, 11:03 AM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

When I read your post, I remembered an addition I was going to make to the panologic plugin but then forgot all about. It concerned the possibility to use the plugin meta operands in your FPP commands.

So, I made the the update, and it might be of interest to you that you can now (amongst many other things) very easily pan to any hotspot - without knowing its position, but just its id. I also made a test page here.

Of course - like uudu says - you use the pano.pan and pano.tilt settings, but I guess you knew that already. As you have looked at the possibilities in panologic, I guess you understand this plugin function:
Code:
<function name="goSpot">
   <![CDATA[ $command(pano.pan=$Myspot.pan,3000;pano.tilt=$Myspot.tilt,3000) ]]>
</function>
That's all you need to pan to a spot (in this case named Myspot).

All the other hotspot attributes and FPP variables that you can access with the meta operands are of course also possible to use in the FPP command string.

You can email or pm me if you want further information.

Tommy
Reply With Quote
  #4  
Old 01-10-2011, 08:59 PM
thegoodbus thegoodbus is offline
Junior Member
 
Join Date: May 2008
Posts: 9
Downloads: 0
Uploads: 0
Default

Thank you very much for your replies.

Uudu, yes, you are right that I just want to change the pan and tilt, but the difference in my request is that rather than specifying a pan of 90 and tilt of 30 onClick, I want to read the current pan and tilt of a hotspot and then change the camera view to that. I can type these individual numbers, but the development time would be shorter and my hair would remain longer if I could just read the current data.

Tommy, this is exactly what I was looking for. I consider this issue SOLVED (I love saying that). You have really exceeded my expectations with that reply and made my day.

I apologize, everyone, for the slightly delayed response. I was wondering if anybody had seen my question because I hadn't received any notifications from my subscription, but just now I found that I had an old email account registered with this forum. That issue too is now fixed. Thank you, FPP community!
Reply With Quote
  #5  
Old 06-01-2011, 04:38 AM
franchtech franchtech is offline
Junior Member
 
Join Date: Apr 2011
Posts: 3
Downloads: 0
Uploads: 0
Question

Hi Tommy,

I use FPP since a few. Your plugins are really splendide.

I've studies in detail panologic plugin. It give many possibilities for my applications.

One thing to know and important for me:
Can we use panologic.xml under a text format but not a file?

My objective is to define dynamically the position of a hotspot (a variable) and move it into this position.
For example, create the xml content by Javascript then pass it to panologic...

Regards,
Robert
Reply With Quote
  #6  
Old 06-02-2011, 12:49 PM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Thanks Robert,

well, I have added the xmlData=<?xml... parameter, that you can use instead of "xmlFile=...".

It is of course used in the same way, i.e. "external.panologic.xmlData=...", but as this is an FPP command, it is parsed by FPP and must not contain characters like .;" or newline. So, the xml string must be escape-coded (NOT html-encoded), and will be unescaped again by the plugin.

There is no ExternalInterface built into the plugin, so you have to go via FPP from your JavaScript function.

The new panologic version is 1.5.

Tommy
Reply With Quote
Reply

Tags
hotspot, plugin, read, store, variable

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:38 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.