Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2008, 08:05 AM
Panorado Panorado is offline
Member
 
Join Date: Sep 2007
Posts: 72
Downloads: 0
Uploads: 0
Default "Next" and "Previous" OnClick function?

I can load a pano fine by it's name... but just want simple, OnClick "next" and "previous"... I didn't see this ability in the tutorial... is it possible?
Reply With Quote
  #2  
Old 02-27-2008, 02:54 PM
zleifr's Avatar
zleifr zleifr is offline
Senior Member
 
Join Date: May 2007
Posts: 609
Downloads: 0
Uploads: 0
Default

yeah, you just have to program in a list of functions that have you loadPano commands, and then have the next button refer to the right one and the previous button refer to the right one. And the on clicking either, you have to execute the function, AND switch the function that will be called on clicking either button.

Zephyr
__________________
Zephyr Renner - AdvancedVirtualTours.com - zleifr @t yahoo

Improving the panoramic one mighty fine plug-in at a time: http://www.flashpanos.com
Reply With Quote
  #3  
Old 02-27-2008, 03:50 PM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: California, USA
Posts: 773
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Panorado View Post
I can load a pano fine by it's name... but just want simple, OnClick "next" and "previous"... I didn't see this ability in the tutorial... is it possible?
If you're using hotspots, then like Zephyr says you'll need to manually do it. You could put a couple functions in your <global/> element ("nextPano", "previousPano"), which all they do is load a next or previous panorama.

Then, have a series of "next" and "previous" button <spots>, each set linked to a particular pano. The onclick function for each could call your <global/> function(s), plus change the <global/> function(s) to reflect the new next/previous panoramas.

Code:
<global nextPano="loadPano(panoName=nature)" />
.
.
.
<spot linked="myPano" onClick="global.nextPano;global.nextPano=loadPano(panoName=otherPano)"
Hmmm... I haven't tested it, but theoretically it should work.

This is why I built that functionality into the dropdown menu plugin -- you can have a spot with a special attribute of "next" of "previous", and the menu will handle loading the appropriate panorama. I suppose you could simply put the dropdown menu's X/Y off-stage, if you didn't want to see it.
__________________
Patrick
http://patrickcheatham.com
Reply With Quote
  #4  
Old 02-29-2008, 05:43 PM
Panorado Panorado is offline
Member
 
Join Date: Sep 2007
Posts: 72
Downloads: 0
Uploads: 0
Default Thanks guys...

I took your suggestions and tried to write some code but... to no avail... I ended up just making a button to make the larger thumbnails (blocking the screen), smaller. So, that works fine.
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 11:58 AM.


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