![]() |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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... |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
||||
|
||||
|
@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()">
Regards, Ph. Last edited by phberlin; 04-25-2008 at 12:06 PM. |
|
#7
|
|||
|
|||
|
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? |
|
#8
|
||||
|
||||
|
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.... |
|
#9
|
|||
|
|||
|
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? |
|
#10
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|