View Full Version : Testing a panologic plugin
allSaints
10-13-2009, 09:49 AM
Hi,
I made a test page for a new plugin that I tentatively named panologic.swf.
It could fill the void in FPP regarding the lack of IF-ELSE logic. With this "logic module" you can put any number of "functions" in an XML file, with FPP commands imbedded in IF-ELSE statements. At the time of writing, the following parameters can be tested in any combination and with an unlimited number of IF-ELSE levels:
pano name
pan value
tilt value
zoom value
pano width
pano height
time of day
date
input parameter
Here is the test page (http://wirestam.com/panos/Flash/panologic/functest.html).
Tommy
jordi
10-13-2009, 10:45 AM
Woowwww !!
that sounds great, we might start thinking of making puzzle games based on panos !!!
Like MYST III Exile (http://www.youtube.com/watch?v=zD1WGvOzoe0)
If you didn't click on the keys ( to catch them ) you can't open the door;
Woowww, this could be really useful !!!
Good luck with the pluguin development ;)
360VT.co.uk
10-13-2009, 02:33 PM
Tommy
That’s very interesting, opening it up to be a lot more interactive.
I like it, you never cease to amaze me, with the things you come up with
Harry
Ton den Ouden
10-14-2009, 07:35 PM
You make them quicker than we can use them Tommy :)
This is another great solution! I have just finished a tour that made it possible to choose between Dutch and English explanations. That was not so easy to realize. I could have used this (I did make a very nice loader though, thanks to you).
I just had a quick look at the demo and maybe I should look further, but I have seen some variables that have no relation to FPP (as far as I know). Like panowidth, date or time. Did you create them, or are those Flash variables that we can use?
Grtz, Ton
allSaints
10-14-2009, 08:23 PM
Hi Ton,
well, panowidth is the current width of your pano. I think that has some connection to FPP. Maybe I should change that to a "fullscreen" test instead?
"Time" and "date" is of course the current time and date in the viewers computer, and can be used to load one pano in the morning and a different pano in the evening and to show something else after a certain date or during a weekend maybe. It's up to you.
And the IF-ELSE statements can be as complex as you want with any levels of IF's and parentheses.
Ton den Ouden
10-14-2009, 09:06 PM
well, panowidth is the current width of your pano. I think that has some connection to FPP.
Haha, I guessed so much Tommy, but I just wondered where this came from and if there are any more variables that we can use. However, like you stated, the possibilities with these are endless.
One of the reasons for asking is something that has been in the back of my head for a while: I think that the standard for monitor screens in the near future will go to 1920x1080 (HD format). That is not always so good for our panos. A 16:9 or 16:10 looks awfull with a large HFOV. I was wondering if it is possible to turn it around: if panowidth/panoheight > ... than reduce width, or reduce zoomMin. Do you think something like that would be possible?
I realize that this is way beyond this subject, but you know that every solution creates it's own new problems :)
Grtz, Ton
Astroman
10-14-2009, 09:38 PM
Yep. Adding some "logic" into tours cld be a good step forward to more advanced tours. Btw. day/night motion (cld be done outside FPP - sure) the possibility to add scripted events or to have more comfortable options of integration content. I think of absolute (images) sizes of detail photos or text or video ... and different screen resolutions or fullscreen option. Thatswhy a step into the right directions. But actually I donґt understand how to use the Panologic. Cause options that i wld switch automaticly need no question and answer games - I wldnґt ask he viewer I just wld do it. I guess that there are millions of creative ways to use a panologic if we have a look closer on it.
http://www.youtube.com/watch?v=wvsboPUjrGc
allSaints
10-14-2009, 09:41 PM
Well Ton,
that's why I post here - I want you to tell me what kind of tests that are of interest. And you immediately had one: screen width/height ratio.
I'm not going to introduce any arithmetic in my IF-ELSE statements - that would be too complex for now. A simple test for screen ratio on the other hand, that could be easily implemented.
What else?
allSaints
10-15-2009, 07:28 AM
Astroman,
I would just like to clarify. It is not a quiz, it is not a matter of asking the viewer anything.
I just put the questions there, so you could see that if you change something (like pan, tilt or zoom) or if you look at the pano at a different time of day, a different FPP command is executed. I just turn one of two hotspots on and off, but it could of course be anything.
If you would like to do something depending on, say, pan position, how would you do that "automatically"?
allSaints
10-16-2009, 08:22 AM
I have added the possibility to test for all hotspot attributes, including:
url
static
staticX
staticY
align
salign
alpha
visible
depth
rotation
scale
onOver
onOut
onClick
...
and so on - including all custom attributes.
steve
10-16-2009, 08:43 PM
Tommy,
does that mean I can "ask" for the parameters in the spot or box elements???
Something Like:
<function name="myFunctionName">
<![CDATA[
if ($mySpotID.alpha = "0") {
$command(global.showTrue)
}
else {
$command(global.showFalse)
}
]]>
</function>
Is that correct???
If(so)...{
you`re genious(yes.you.are)
}
else...{
would be great( ;-)) )
}
Best would be to write the commands in the (PLUGIN)xml file, like:
<function name="myFunctionName">
<![CDATA[
if ($mySpotID.alpha = "0") {
$command(mySpotID.alpha = 1)
}
else {
$command(mySpotID.alpha = 0.5)
}
]]>
</function>
Or is it already possible??(Haven`t tested your plugIn yet, just thinking...)
What we need:
- fullscreen mode on / off
- and the screen width/height ratio you already mentioned is my wish(for now...;-))
Tommy, absolutly great work you do,(think it`s more a sport activity for you;-)) )
thank you so much, your PlugIns bring sun in pano philosophy;-))
Steve
(Waiting to be a Beta Tester;-))
allSaints
10-16-2009, 09:27 PM
Steve,
I can answer "yes" to both your questions.
And the screen width/height ratio and fullscreen tests are implemented and working.
I just wanted to get some feedback before I put it on my server. As I have said before, I don't do any pano tours so I'm not that familiar with the problems you guys can face. But now I've got the impression that not many understand what the plugin does or the use of it.
However, I will upload a first version of it this weekend, so you can test it pretty soon.
steve
10-16-2009, 09:50 PM
COOOOOOOL!!!
Be sure I will be one of the first tester...
I think your PlugIn is really specialized, but I see the power of this... simple games, interactive documentation depending on the view of the pano and so on...Perhaps it just needs more time to think about;-))
Steve
birdseye
10-17-2009, 05:36 AM
Another super plug for FPP Tommy, thank you so much.
...and just as Ton said, you make them faster than we could test them ;)
1 small concern... do you think they will be compatible with new version of FPP? I hope so because I would hesitate to change to FPP3 without such a plugin treasure.
Grtz,
Yvan.
allSaints
10-17-2009, 09:59 AM
Yvan,
what little I have heard so far about the new version, there will possibly be only a small change when initializing the plugins. Maybe some plugins don't have to be changed at all.
I have full confidence in Denis' work, and whatever he will do, I will try to adjust my small contributions to enhance his product and to make FPP the best pano engine around.
Astroman
10-17-2009, 12:49 PM
If you would like to do something depending on, say, pan position, how would you do that "automatically"?
Actually I wld use the Commander plugin for this (btw. is this a kind of if... then - function).
1.)Events start when the viewer releases through diverse values (pan, tilt, zoom, time or delay)
2.)Content - Images, Videos ... will be presented in the best resolution depending on screen size and ratio (therefore the "plugin" do some tests automatic tests and executes commands) = cld maybe done with Panologic
I think, the power of the plugin wld be the use of every hotspot/pano/global property as "if... else" logic.
allSaints
10-17-2009, 01:01 PM
Astroman,
well, commander and panologic complement each other:
commander is active all the time - checking what the user does or does not, and can take action on its own depending on what it sees.
panologic, on the other hand, lies dormant and does nothing until you call it. And then it can make decisions that you - as a tour builder - cannot make at construction time, and go into different directions depending on a number of dynamic factors.
Ton den Ouden
10-19-2009, 01:13 AM
I have been away for a few days and just checked in to notice that you have really stirred the water this time Tommy ;)
It seems to me that you have created a kind of Pandora's box (but a very positive one!). It is hard for me to see all the consequences, but I have the feeling that this may be a historic change in how we can make virtual tours. As soon as I can make my hands free I will give it a try.
My biggest concern is if I am able to switch my way of thinking to use this in an optimal way. It will be quite a challenge!
To be continued for sure!
Grtz, Ton
Ton den Ouden
10-22-2009, 08:59 PM
Problems :confused:
I have been testing with the panologic plugin, but I can't get it to work. Testing the width, there is no response at all.
I used the panologic.xml as it comes with the zip file and stripped the calling xml to the bone like this:
<?xml version="1.0" encoding="utf-8" ?>
<panorama meta='copyright www.pro4pics.com'>
<parameters>
panoName = wg_tour/visualFiles/foto_0
panoType = cube
layer_1 = wg_tour/plugins/hotspots.swf
layer_2 = wg_tour/plugins/ffc_tooltips.swf
layer_3 = wg_tour/plugins/ffc_smartscale.swf
layer_4 = wg_tour/plugins/panologic.swf
layer_5 = wg_tour/plugins/menuFullscreen.swf
</parameters>
<hotspots>
<global
showTrue="Qtrue.scale=1"
showFalse="Qfalse.scale=1"
>
<spot id="test" url="wg_tour/visualFiles/lader_d.png" visible="1" static="1" depth="24" salign="C" staticX="0" staticY="0" scale="1" alpha="1" onClick="external.panologic.test2=x"/>
<spot id="Qtrue" url="wg_tour/visualFiles/check.png" visible="1" static="1" depth="24" align="C" salign="C" staticX="-30" staticY="100" scale="2" alpha="1" />
<spot id="Qfalse" url="wg_tour/visualFiles/uncheck.png" visible="1" static="1" depth="24" align="C" salign="C" staticX="30" staticY="100" scale="2" alpha="1" />
</global>
</hotspots>
</panorama>
I am sure that I am overlooking something, but after 2 hours I give up.....
Hope you can help me Tommy!
Thanks, Ton
allSaints
10-22-2009, 09:04 PM
Hi Ton,
if you have an url I think it would be easier if I could test it directly with the Flash Debug Player
Ton den Ouden
10-22-2009, 09:28 PM
I have just uploaded the file Tommy,
http://www.pro4pics.com/tenkate/test.html
Thanks for the quick response!
Grtz, Ton
allSaints
10-22-2009, 09:41 PM
Ton,
the plugin wants to load this file:
http://www.pro4pics.com/tenkate/panologic.xml
but it cannot find it.
There must be a path problem.
Ton den Ouden
10-22-2009, 09:50 PM
And that is where it is now Tommy, and it is working!!!
It was in the xml directory. I would like to keep it there. Is that possible?
Thanks again!
Grtz, Ton
P.S. If not possible, I can live with that ;-)
allSaints
10-22-2009, 09:59 PM
Nice Ton,
most errors are trivial - it's just a matter of finding them... and that might not be so trivial...
PS. Funny, but I saw a film earlier today on TV about Franz Hals, and I saw your picture in front of me - I wonder why...?
Ton den Ouden
10-22-2009, 10:10 PM
I think Frans tried to warn you about me calling on you :)
Life is full of strange surprises, I agree. And the nice thing is that most of them are positive!
Now, for me the real work begins. I will keep you posted.
Grtz, Ton
P.s. get some sleep :)
tkerns
10-23-2009, 04:07 AM
This looks fantastic! Would we be able to use this plugin to load larger versions of a pano when in fullscreen, and load the smaller version when not in fullscreen on a multinode tour?
For example have a function that fires onenterfullscreen that checks to see what pano is currently loaded, and then load the large version, and another function that fires onexitfullscreen that does the opposite?
There could be a series of if-then statements like this in pseudocode
if pano loaded = pano1
load pano pano1_large
if pano loaded = pano2
load pano pano2-large
or better yet, if the name of the loaded pano could be stored in a variable, you wouldnt need an if-then for each possibility.
Would something like this be possible?
Thanks!
Tom
Ton den Ouden
10-23-2009, 07:34 AM
I have done some experimenting again this morning and found that it works fine now with an onOver, or onClick command.
But if I try to run it automaticaly with an onLoad, or onTransitionend I get no response.
The idea is to show a welcome message at the start. If the screen is smaller than x, I want it to scale the message down to 80%. But it would be nice if it could run without interaction of the visitor. Is that possible?
Grtz, Ton
allSaints
10-23-2009, 07:57 AM
Hi Tom,
Well, the name of the loaded pano IS stored in a variable in FPP, and this variable is used by the plugin. In the IF statements you can refer to this variable with $panoname :
if ($panoname == "pano1small") { $command(global.loadPano1large) }
But - in this case - couldn't you as easily have a linked spot for each pano with an onEnterFullscreen function that loads a larger pano and an onExitFullscreen function that loads a smaller pano? I don't build any tours, so I'm not sure.
Tommy
allSaints
10-23-2009, 08:15 AM
Good morning ton,
I have noticed that interaction with external plugins when loading a new pano is very "shaky" or at least very timing sensitive. One of the problems is that there is no written documentation of the FPP plugin API - just a few examples that you can study, and by trial and error try to find out how things work.
So even if a command reaches a plugin when you are about to load a new pano (as can be seen with a debug trace), the resulting FPP command back to the pano is often lost - and nothing seems to happen. I have tried to get around that problem a couple of times, but no luck so far - at least not with an easy solution.
Regarding your problem with the misplaced xml file, you can place it anywhere you like. You just have to get the path right. If you use relative paths, you sometimes have to use like "../files/myfile.xml" to back up one step in the directory tree.
Tommy
Ton den Ouden
10-23-2009, 09:30 AM
I have tried to get around that problem a couple of times, but no luck so far
It would have been nice, but I am not surprised and I can live with it. You know we always want more :) Look at it as a future request ;)
I have just done some testing with FPP commands directly in the panologic.xml and I do like that!!! It makes the calling xml much simpler and the panologic much better to understand (and maintain!).
Great with a more complex code like this one that I have just tried:
if ($panowidth < 1000) {
$command(infoscreen.visible=1; infoscreen.scale=0.8;infoscreen.staticX=550;infosc reen.staticY=10)
}
else {
if ($panowidth > 1000 && $panowidth < 1100) { $command(infoscreen.visible=1;infoscreen.scale=1;i nfoscreen.staticX=600;infoscreen.staticY=10) }
if ($panowidth > 1100 && $panowidth < 1200) { $command(infoscreen.visible=1;infoscreen.scale=1;i nfoscreen.staticX=650;infoscreen.staticY=10) }
if ($panowidth > 1200 ) { $command(infoscreen.visible=1;infoscreen.scale=1;i nfoscreen.staticX=650;infoscreen.staticY=100) }
}
I am afraid I have no more time to spend on it right now, but now I have tasted it, I surely know that I will be using it in my current and future projects.
I will also fix the placement of the xml. I like to have them together.
Thanks a lot (once again), Ton
tkerns
10-24-2009, 04:48 AM
But - in this case - couldn't you as easily have a linked spot for each pano with an onEnterFullscreen function that loads a larger pano and an onExitFullscreen function that loads a smaller pano? I don't build any tours, so I'm not sure.
I didnt know there was a panoname variable I had access to in the FPP xml file.
I was able to do this easily on a single pano tour, as I always knew what pano I was viewing, so then onEnterFullscreen, I just loaded the large version and visa versa.
However, I did not know of a way in the xml file to do a
'onEnterFullscreen load the large version of whatever current pano is loaded'
and I though the if/then logic of this plugin might be perfect.
If there is a way to do this directly in the FPP xml file though, that would definately be preferable.
Thanks!
Tom
allSaints
10-24-2009, 11:17 AM
Tom,
well, there are no variables in the FPP xml file that we can use.
What I ment was, if you have like 5 panos in a tour, you can have 5 hotspots, each linked to its own pano. And then YOU of course know the name of the loaded pano when you write the onLoad() function for each hotspot.
And in these functions you write:
onLoad="global.onEnterFullScreen=loadPano(...);global.onEx itFullScreen=loadPano(...)"
And of course only one of these hotspots will be active at any given time when the viewer goes Fullscreen.
But then again, maybe it's cleaner with one panologic plugin than 5 hotspots...
Tommy
Astroman
11-12-2009, 12:59 PM
Hello Tommy,
according to your posting weeks ago about panologic with onLoad, onStart events I wld like to ask if there is a possibilty out there.
So even if a command reaches a plugin when you are about to load a new pano (as can be seen with a debug trace), the resulting FPP command back to the pano is often lost - and nothing seems to happen. I have tried to get around that problem a couple of times, but no luck so far - at least not with an easy solution.
A.
allSaints
11-12-2009, 09:12 PM
Hello again D,
well, at the time of pano loading, everything in FPP seems to be in a transitional state. So, there are chains of events taking place to insure that everything is done in correct order and at the correct time.
After the plugin has been loaded it first has to wait for parameter data, then it has to wait for its own xml file to be loaded and parsed. And if the plugin is called at the onLoad event, there is some problem getting the correct pano name.
Furthermore, the part of the code that's dealing with the logic in the plugin, hasn't got a clue that a new pano is being loaded. So far I havn't managed to get the pano name issue to work properly at onLoad. And getting the correct pano name is what it's all about, isn't it?
Tommy
Ton den Ouden
11-21-2009, 04:16 PM
I finally found a nice opportunity again to use the panologic plugin.
The idea is to swap the fullscreen button with another one on going full.
The problem is that I can't get any response from a fullscreen test. I have tried anything by now, like ==1, == true, >0 but I get no reaction.
This is copied almost exactly from the plugin site, but without success:
<function name="fulltest">
<![CDATA[
if ($fullscreen == 1) {
$command(full.visible=0)
}
else {
$command(full.visible=1)
}
]]>
</function>
Changing the test to panowidth > 1200 suddenly works fine. So the problem is not in the command structure. I tried both Firefox and IE8.
Any idea what can be wrong Tommy?
Grtz, Ton
allSaints
11-21-2009, 05:41 PM
Yes Ton,
and I'm sorry for causing you any trouble, because I found a bug. I fixed it and uploaded a new version (V1.1.2).
You can check that it works now here (http://wirestam.com/panos/Flash/panologic/functest3.html).
Regards,
Tommy
Ton den Ouden
11-21-2009, 06:01 PM
Haha, quick as ever. And don't be sorry about it.
The only thing to be sorry about is that you (still) make the plugins faster than we can test them ;)
I will give it a try and report back.
BTW, I had the same problem a few weeks ago with the panoheight. I solved it then by choosing width, but there may be a small problem there too. I did solve a nice problem with it though. At the moment I am finishing a very large tour with the help of this plugin. When it is ready (1 or 2 days) I will show the result. Thanks!
Grtz, Ton
Ton den Ouden
11-21-2009, 06:14 PM
I don't see any change Tommy. The demo seems to have the same problem. The creation date of the swf is 19-11. Maybe you were too quick? :)
Grtz, Ton
allSaints
11-21-2009, 07:41 PM
Well Ton,
I have uploaded all new files, I have checked their dates and the test page works OK when I try it. It sounds like you have to clear your browser cache. Try again please and see what happens.
Tommy
Ton den Ouden
11-21-2009, 07:57 PM
Clearing the cache did not help, but downloading the new files did the job. It is working now Tommy! Thanks once again. Drinks are on the house tonight :D
Results coming soon.
Grtz, Ton
Ton den Ouden
11-21-2009, 10:47 PM
This is the most complicated tour that I have made so far.
It is a company tour in two languages with a number of requests:
- visitors should not get lost and keep the overview
- it should be easy to pick a department for a closer view without distractions
- the 3 stocks should be integrated into one view
- it should be easy to switch to other departments
As usual, I used Tommy's loader to add an unique touch for the customer.
I used Tommy's panoligic plugin for the following:
- if the screen is small, the introduction is scaled down to fit
- on larger screens, the intro is put more down and to the right to get a better layout
- the full screen button is swapped, when in full screen
I am very happy with the results!
http://www.pro4pics.com/site/rondleiding/tenkate/index.html
Grtz, Ton
Hi Ton
Very nice and clean work.
Found a small bug. When clicked on large yellow button with the name of place you currently are , everything stop to work. Next clicks on Floor plan button only changes blur of pano.
uudu
Ton den Ouden
11-21-2009, 11:19 PM
I will look into it :( but many thanks!
It seems I have to change 28 XML's.... Tomorrow is another day :)
grtz, Ton
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.