Forums  

Go Back   Forums > Talk > Panorama techniques

Reply
 
Thread Tools Display Modes
  #1  
Old 04-17-2008, 10:23 PM
andres009 andres009 is offline
Junior Member
 
Join Date: Mar 2008
Posts: 1
Downloads: 0
Uploads: 0
Default preloading panoramas

Hello fellows,

I'm trying to preload a set of panoramas from a Flash application. Is there any function in the plug in that I can use?
Other option...

Thank you for any help.
Reply With Quote
  #2  
Old 04-20-2008, 04:48 PM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 503
Downloads: 0
Uploads: 0
Default

Zephyr has his Image Cache Plug-In at Flashpanos.com

There is some question or confusion about whether or how well it actually works. Perhaps Zephyr, if he sees this thread, can clear that up.
__________________
Scott
Tour de Force 360VR
Scott Witte Photography
----------------------
Auto Quality Plugin: Guarantee the best FPP experience possible for every viewer on every computer.
Motion Zoom Transition Plugin: Move from Node to Node
Reply With Quote
  #3  
Old 04-21-2008, 10:18 AM
HansNyberg HansNyberg is online now
Senior Member
 
Join Date: Oct 2007
Posts: 590
Downloads: 0
Uploads: 0
Default

AS long as you use images (cubefaces) you can just use a standard javascript preloading script in your html file.

Works perfect in all browsers. Safari will however not load more than around 15-18 mb in all.

Hans
Reply With Quote
  #4  
Old 04-25-2008, 02:58 AM
djsegler djsegler is offline
Member
 
Join Date: Apr 2008
Posts: 62
Downloads: 0
Uploads: 0
Default

What's the javascript/html syntax for loading the images so it's compatible with the pano or pano0 swf files?

This is what I've used before:

<SCRIPT LANGUAGE="JavaScript">
<!-- hide from none JavaScript Browsers
Image1= new Image(700,500)
Image1.src = "images/image_0.jpg"

Image2 = new Image(700,500)
Image2.src = "images/image_1.jpg"

// End Hiding -->
</SCRIPT>

Does this still apply here? How should the images be named or referrenced? This method doesn't seem to be having any effect so far.

Last edited by djsegler; 04-25-2008 at 04:10 AM. Reason: Added code example...
Reply With Quote
  #5  
Old 04-25-2008, 05:17 AM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: Berkeley, California, USA
Posts: 774
Downloads: 0
Uploads: 0
Send a message via AIM to cheathamlane
Default

Hmm...

Maybe try putting that in an actual function call, and calling it from the onload of your HTML doc?

I don't think this is an FPP issue...
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
Reply With Quote
  #6  
Old 04-25-2008, 10:45 AM
phberlin's Avatar
phberlin phberlin is offline
Senior Member
 
Join Date: Aug 2007
Location: Berlin, Germany
Posts: 299
Downloads: 0
Uploads: 0
Default

@djsegler

Maybe you could, like cheathamlane suggested, try using something like this:

Code:
<script language="JavaScript">
<!-- hide from non-JavaScript-browsers

function PreloadImages()
{
var myImage1 = new Image();
myImage1.src = 'images/image1.jpg';

var myImage2 = new Image();
myImage2.src = 'images/image2.jpg';

}

// End Hiding -->
</script>

<body onload="PreloadImages()">
Haven't tried this yet, but maybe it works. Please let us know if it's of any use.

Regards, Ph.

Last edited by phberlin; 04-25-2008 at 12:06 PM.
Reply With Quote
  #7  
Old 04-25-2008, 10:49 AM
djsegler djsegler is offline
Member
 
Join Date: Apr 2008
Posts: 62
Downloads: 0
Uploads: 0
Default

I'll try this - but I still have a question about how to name the images.

What naming convention should I use in either the HTML or FPP so that things match?

I'm using cube faces that are named as name_# along with pano0.swf -

Do I use it as usual and just use the HTML with whatever *.src names I choose to just get them loaded?
Reply With Quote
  #8  
Old 04-25-2008, 12:09 PM
phberlin's Avatar
phberlin phberlin is offline
Senior Member
 
Join Date: Aug 2007
Location: Berlin, Germany
Posts: 299
Downloads: 0
Uploads: 0
Default

Please note that I've changed something in the code below, so if you copy and pasted it, just do it again :-)

As to your naming question: Why don't you just take the specific filenames (including the path) that are to be preloaded? So, if you have "cubeface_0.jpg", "cubeface_1.jpg" and so on, just take these..?! But maybe I don't get your question....
Reply With Quote
  #9  
Old 04-25-2008, 12:22 PM
djsegler djsegler is offline
Member
 
Join Date: Apr 2008
Posts: 62
Downloads: 0
Uploads: 0
Default

Let me be more specific...

As an example, assuming I'm using the format of cubeface_0.jpg for my panos today...

The HTML would use the statements like this:

var cubeface_0 = newimage ();
cubeface_0.src = 'cubeface_0.jpg';

var cubeface_1 = newimage ();
cubeface_1.src = 'cubeface_1.jpg';

etc....

Is this correct?
Reply With Quote
  #10  
Old 04-25-2008, 05:56 PM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 503
Downloads: 0
Uploads: 0
Default

I almost hesitate to bring this up since I can't find the source code just now, plus my near total lack of javascript knowledge will be all too evident but...

I saw a nice trick allowing you to precache images with a javascript loop that would go something like this:

for n=0; n<=5; n++ {
var cubeface = newimage();
cubeface.scr = "panoName_" + n + ".jpg";
}

Of course, instead of "panoName_" you would have something like "images/entrance_".

Even cooler, panoName could itself be a variable constructed from a list of panonames, so you just input the list and all the cubefaces for all the panos are preloaded. Someone who actualy knows javascript could probably whip that code into order in no time.

But what I really want is a way to call this dynamically from FPP. Lets say you have a tour with 10 nodes. The panos you most want preloaded will be the ones most likely visited from the pano currently displayed. So lets say you create the script described above and call it panoPreload. When you do a loadPano in FPP you could include something like:

onTransitionEnd = javascript: panoPreload(images/reception, images/auditorium);

Would that work? Can FPP's javascript command call a named script in the underlying HTML and pass variables to it?
__________________
Scott
Tour de Force 360VR
Scott Witte Photography
----------------------
Auto Quality Plugin: Guarantee the best FPP experience possible for every viewer on every computer.
Motion Zoom Transition Plugin: Move from Node to Node
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 10:20 AM.


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