Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #11  
Old 08-05-2009, 08:30 AM
LepLep LepLep is offline
Senior Member
 
Join Date: Jun 2008
Posts: 185
Downloads: 0
Uploads: 0
Default

there are no variables, but there are workarounds
Code:
spot id="loadPano1" onClick="loadPano(?panoName=pano1);panHomeButton.onClick=panoramaOpeningView1;"
__________________
midnight sun in Troms? - 360 panorama or northern lights over Troms? - 360 panorama
anonymous tourist:"but why there is only one sun?"
Reply With Quote
  #12  
Old 08-05-2009, 08:31 AM
Pat S Pat S is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by allSaints View Post
Pat,

I think you have to lower your expectations.

The XML file is just a configuration file - it's not a fullblown script language. There are no variables. There are no conditionals. The only thing you can do is name blocks of keyword assignments (here called functions). And remember that the pan, tilt and zoom, etc... are properties of one of the objects involved and therefore has to specified as such: pano.pan, pano.tilt, etc...

Tommy
Then what are the variables Denis talks about in the Hotspots section of the tutorial?

"Assignments and motion tweens

The assignment in Hotspots plugin is a special command used to change parameters of objects instantly or with some continuous effect (motion tween).

Assignments can change only variables. Don't try to change the value of a function. All functions are statically defined.

Simple assignment: [name]=[value]. Can be used to change any variable of any object:"

Am I beating myself up for nothing?

Is there no way to do this in the XML? If not, can it be done with a plug-in (either one that comes with FPP or one of yours)?

Last edited by Pat S; 08-05-2009 at 08:58 AM.
Reply With Quote
  #13  
Old 08-05-2009, 08:41 AM
Pat S Pat S is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by LepLep View Post
there are no variables, but there are workarounds
Code:
spot id="loadPano1" onClick="loadPano(?panoName=pano1);panHomeButton.onClick=panoramaOpeningView1;"
That doesn't work either. Here's the page so you can look at the code see exactly what I'm doing.
Reply With Quote
  #14  
Old 08-05-2009, 09:04 AM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

What Denis means is that his objects has variables - or rather "properties", that you can assign static values to.

The usual definition of variable would be like:

myvariable="123";
pano.pan=myvariable;

That is not possible here.

Quote:
Is there no way to do this in the XML? If not can it be done with a plug-in (either one that come with FPP or one of yours)?
That question is not relevant. XML is just a way of marking data with tags. XML in itself can not do anything.


Tommy
Reply With Quote
  #15  
Old 08-05-2009, 09:07 AM
HansNyberg HansNyberg is offline
Senior Member
 
Join Date: Oct 2007
Posts: 611
Downloads: 0
Uploads: 0
Default

Why do you need the opening view command. You already have the same pan-tilt-zoom in the loadpano command.

Or do you want to change from the opening view and move to something else.
Like I do when you click the thumbs in these panos.
http://www.panoramas.dk/2008/ildregatta-silkeborg/

Hans
Reply With Quote
  #16  
Old 08-05-2009, 09:14 AM
Pat S Pat S is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Downloads: 0
Uploads: 0
Default

Quote:
That question is not relevant. XML is just a way of marking data with tags. XML in itself can not do anything.
Aarrrgh!

Is there a plug-in that acts like a variable so I can store data in it and use it like I'm trying to do in this instance?

---------------

Quote:
Why do you need the opening view command. You already have the same pan-tilt-zoom in the loadpano command.
Because I want an "opening view" button like all of these panos have.
Reply With Quote
  #17  
Old 08-05-2009, 09:16 AM
HansNyberg HansNyberg is offline
Senior Member
 
Join Date: Oct 2007
Posts: 611
Downloads: 0
Uploads: 0
Default

Oh now I see you have what most people call a home button for each pano.
I think you have to make a button linked to each pano with the command.

Just use the same jpg/png but with different id and link them with each pano.

Thats the simple way to do it. Not sure if you can use the link command to actions.

Hans
Reply With Quote
  #18  
Old 08-05-2009, 09:33 AM
Pat S Pat S is offline
Junior Member
 
Join Date: Jul 2009
Posts: 20
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by HansNyberg View Post
Oh now I see you have what most people call a home button for each pano.
Exactly.


Quote:
I think you have to make a button linked to each pano with the command.

Just use the same jpg/png but with different id and link them with each pano.

Thats the simple way to do it. Not sure if you can use the link command to actions.

Hans
Thanks. That seems like it'll work. [he said foolishly]

What I had problems with earlier before I started asking questions here was even getting the onClick to work with the pan/tilt/zoom values. I couldn't even get it to work with just a pan value.

This is what I tried without success:
onClick="pan=90;tilt=0;zoom=0.8;"

Then I tried just:
onClick="pan=90"

And couldn't get that to work either. How can I get an onClick to move the pano to a specific pan/tilt/zoom position?
Reply With Quote
  #19  
Old 08-05-2009, 09:55 AM
allSaints's Avatar
allSaints allSaints is offline
Senior Member
 
Join Date: Aug 2008
Location: Stockholm, Sweden
Posts: 945
Downloads: 0
Uploads: 0
Default

Pat,

you really should read the replies given to you a little more carefully . You have been told about three times now that the correct syntax would be:

onClick="pano.pan=90;pano.tilt=0;pano.zoom=0.8;"


Tommy
Reply With Quote
  #20  
Old 08-05-2009, 10:18 AM
LepLep LepLep is offline
Senior Member
 
Join Date: Jun 2008
Posts: 185
Downloads: 0
Uploads: 0
Default

im sure it works,

you type
Quote:
go_10="loadPano(panoName=panoramas/toni_scotts_1-woman_show_bloodlines_3-17-09-10&pan=0&tilt=-7&zoom=0.8&panorama_opening_view=panorama_opening_ view-10());"
i type (twice)
Quote:
onClick="loadPano(?panoName=pano1&tiltHome=0&panHo me=1);panHomeButton.onClick=panoramaOpeningView1;"
__________________
midnight sun in Troms? - 360 panorama or northern lights over Troms? - 360 panorama
anonymous tourist:"but why there is only one sun?"
Reply With Quote
Reply

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 06:44 PM.


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