Forums  

Go Back   Forums > Talk > Panorama techniques

Reply
 
Thread Tools Display Modes
  #11  
Old 04-25-2008, 06:25 PM
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

Scott:

http://flashpanoramas.com/forum/show...ght=javascript

Have you tried it? I haven't, but following the logic from this post and the above linked thread (regarding your window.close issue), it seems to me it _should_ work.

You could end up with something like:
onClick="javascript:panoPreload('images/reception', 'images/auditorium');"
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation

Last edited by cheathamlane; 04-26-2008 at 10:08 PM. Reason: fixed link
Reply With Quote
  #12  
Old 04-26-2008, 06:36 PM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 510
Downloads: 0
Uploads: 0
Default

Patrick,

Something was wrong with your link, but for anyone interested the thread referred to is this: close browsr from a hotspot?

Anyway, while it is often against my nature I decided to RTFM and Denis says about the javascript command: "You can use it to open new popup windows (a way to avoid popup blockers) and to run any external Javascript functions:"

So, it certainly should work... if only I knew enough javascript to write the function, in particular how to pass a string of variables to it and process those variables in sequence. Learning that won't happen very soon, I'm afraid, as I have more pressing issues.

But for anyone who knows javascript (and you know who you are), everything is in place. I would love to see someone do this.
__________________
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
  #13  
Old 04-26-2008, 10:07 PM
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

Quote:
Originally Posted by Scott Witte View Post
So, it certainly should work... if only I knew enough javascript to write the function, in particular how to pass a string of variables to it and process those variables in sequence. Learning that won't happen very soon, I'm afraid, as I have more pressing issues.


Scott (Mr. Humble), you can write AS can't you? All the pieces are right here in this thread...

See a working example of calling a JS from your FPP onClick at:
http://www.flashpanos.com/flashpanos...ams-test2.html

View HTML source for the JavaScript function & XML source for the onClick. The onClick of the button should show a JavaScript Alert box, with "Hello" and the panoNames that were passed to it.

--
I leave if/else blocks, for loops and switching to you...

HTH
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
Reply With Quote
  #14  
Old 04-27-2008, 12:09 AM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 510
Downloads: 0
Uploads: 0
Default



Quote:
Originally Posted by cheathamlane View Post
:The onClick of the button should show a JavaScript Alert box, with "Hello" and the panoNames that were passed to it.

--
I leave if/else blocks, for loops and switching to you...
Too funny! You easily answered one of my questions (passing paramaters). Now, how where you thinking I would tackle the loop in the js function to construct a sequence of "panoname" variables and debug the image preloading loop so it actually worked? A functioning example would be appreciated



Seriously, it can obviously be done and maybe without that much difficulty. Right now I have to figure out how to sync two audio files and keep them in sync. That is proving a real challenge, although reading the AS3 docs you wouldn't think so. But that is a little OT for this thread.
__________________
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
  #15  
Old 04-27-2008, 01:26 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

Quote:
Originally Posted by Scott Witte View Post
Too funny! You easily answered one of my questions (passing paramaters). Now, how where you thinking I would tackle the loop in the js function to construct a sequence of "panoname" variables and debug the image preloading loop so it actually worked? A functioning example would be appreciated
--
Seriously, it can obviously be done and maybe without that much difficulty. Right now I have to figure out how to sync two audio files and keep them in sync. That is proving a real challenge, although reading the AS3 docs you wouldn't think so. But that is a little OT for this thread.
I had a really nice long answer for this post, but Safari crashed on me twice... ARGH!

Has anyone else had issues with Safari and the Flash Player debug version 9r124?

--
Example code below -- could be much neater, but here you go for free and on the quick. . This is based on an example from my dusty old DreamWeaver MX 2004 Javascript Reference; Macromedia's example Javascripts abound on the internet in many permutations. Here's mine:

Code:
//javascript:
function simplePreload(){ 
  var args = simplePreload.arguments;
  var panoSourceName;
  
  document.imageArray = new Array();
  for(var i=0; i<args.length; i++) {
	  for(var z=0; z<6; z++) {
    	document.imageArray.push(new Image);
		if (z==0) {
			panoSourceName = args[i] + "_b.jpg";
		} 
		if (z==1) {
			panoSourceName = args[i] + "_d.jpg";	   
		} 
		if (z== 2) {
			panoSourceName = args[i] + "_f.jpg";		   
		} 
		if (z== 3) {
			panoSourceName = args[i] + "_l.jpg";		   
		} 
		if (z== 4) {
			panoSourceName = args[i] + "_r.jpg";		   
		} 
		if (z== 5) {
			panoSourceName = args[i] + "_u.jpg";		   
		}
               //BELOW LINE FOR PRODUCTION:
    	       //document.imageArray[imageArray.length-1].src = panoSourceName;
   	       //BELOW LINE FOR TESTING:
               alert(panoSourceName);
	  }
  }
}
Code:
//XML
<spot 
id="myspot" 
url="myspot.png" 
onClick="javascript:simplePreload('images/reception', 'images/auditorium');"
/>
The link in my post above uses this script.

HTH
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
Reply With Quote
  #16  
Old 04-27-2008, 02:42 AM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 510
Downloads: 0
Uploads: 0
Default

Looking Good, Patrick! Looking forward to experimenting with this when I have more time. Guess I'm obligated now, thanks to you...

Once again you prove yourself one of the great treasures of this forum. They just don't pay you enough!
__________________
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
  #17  
Old 04-27-2008, 02:56 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

Quote:
Originally Posted by Scott Witte View Post
Looking Good, Patrick! Looking forward to experimenting with this when I have more time. Guess I'm obligated now, thanks to you...
Ha, cool -- get to it!

I haven't _really_ tested it -- but it should work. Even with all the above code & posts, though, it seems like a little bit of work. Something like Zephyr's image cache plugin could save a few keystrokes, and keep everything FPP-centric (i.e., out of the HTML).


Quote:
Originally Posted by Scott Witte View Post
Once again you prove yourself one of the great treasures of this forum. They just don't pay you enough!
Thanks... Now go buy one of my plugins, will you?

I would be curious, though, about the sound syncing... I have yet to 1) need to deal with it and 2) get my head around AS3 sound handling. :P

Cheers
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
Reply With Quote
  #18  
Old 04-27-2008, 03:28 AM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 510
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by cheathamlane View Post
Even with all the above code & posts, though, it seems like a little bit of work. Something like Zephyr's image cache plugin could save a few keystrokes, and keep everything FPP-centric (i.e., out of the HTML).
...As I suggested earlier. (Or was it just in several other threads?) Actually I still haven't seen Zephyr explain the bugs some people have encountered and really wish he would. While everything we've discussed here may work great for cubefaces it doesn't help at all with any other media types. Zephyr's plugin could. And I would really rather use that than build my own. I will have to follow one path or the other before long.

Zephyr, where art thou?

BTW, I had my wallet out ready to buy Extensible Tooltips but then it turned out to be FREE! What's a capitalist to do? Not that I'm complaining.
__________________
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
  #19  
Old 04-27-2008, 04:18 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 the consumer foiled by a freebie

Quote:
Originally Posted by Scott Witte View Post
BTW, I had my wallet out ready to buy Extensible Tooltips but then it turned out to be FREE! What's a capitalist to do? Not that I'm complaining.


Heh, fair enough! You try to be a good consumer, and get foiled at every turn.

Well, you can always buy one of my prints... :twisted:

http://www.cheathamlane.net/prints/

Cheers
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
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 08:12 AM.


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