Implementing Prefer Flash to already published projects

Q&A about the latest versions
Post Reply
altman.norris
Posts: 33
Joined: Thu Jan 27, 2011 9:58 am

Implementing Prefer Flash to already published projects

Post by altman.norris » Mon Jul 18, 2011 1:42 am

I would like to change about 100 of our projects from "flash fall back" to the new method that "prefers flash". This is accomplished in the HTML5 settings by changing the .ggt file and selecting the normal template and the appropriate elections. My QUESTION is...is there a way that I can do this by replacing some of the text in the html5.html file or do I need to republish each and everyone of these projects and then re-upload to the server?

Thank you for your assistance!

AJ

User avatar
Hopki
Gnome
Posts: 9653
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Implementing Prefer Flash to already published projects

Post by Hopki » Mon Jul 18, 2011 11:49 am

Hi Aj
You can just change the code around, your HTML page with flash fullback will look like this:

Code: Select all

</script>
		<script type="text/javascript">
		// check for CSS3 3D transformations
		if (Modernizr.csstransforms3d) {
			// use HTML5 panorama
	
			// create panorama container 
			document.writeln('<div id="container" style="width:100%;height:100%;"></div>');
			// create the panorama player with the container
			pano=new pano2vrPlayer("container");
			// add the skin object
			skin=new pano2vrSkin(pano);
			// load the configuration
			pano.readConfigUrl("pano.xml");
			// hide the URL bar on the iPhone
			hideUrlBar();
		} else 
		if (DetectFlashVer(9,0,0)) {
			p2q_EmbedFlash('pano.swf',
				'100%', '100%',
				'bgcolor', '#f0f0f0',
				'play', 'true',
				'cache','true',
				'allowFullscreen','true',
				'autoplay','true'); 
			
		} else {  
			document.write('This content requires HTML5/CSS3 or Adobe Flash Player Version 9 or higher. ');
		}
		</script>
The Prefer Flash version will look like this:

Code: Select all

<script type="text/javascript">
		if (DetectFlashVer(9,0,0)) {
			p2q_EmbedFlash('pano.swf',
				'100%', '100%',
				'bgcolor', '#f0f0f0',
				'play', 'true',
				'cache','true',
				'allowFullscreen','true',
				'autoplay','true'); 
			
		} else 
		// check for CSS3 3D transformations
		if (Modernizr.csstransforms3d) {
	
			// create panorama container 
			document.writeln('<div id="container" style="width:100%;height:100%;"></div>');
			// create the panorama player with the container
			pano=new pano2vrPlayer("container");
			// add the skin object
			skin=new pano2vrSkin(pano);
			// load the configuration
			pano.readConfigUrl("pano.xml");
			// hide the URL bar on the iPhone
			hideUrlBar();
		} else {  
			document.write('This content requires HTML5/CSS3 or Adobe Flash Player Version 9 or higher. ');
		}
		</script>
Regards
Hopki

altman.norris
Posts: 33
Joined: Thu Jan 27, 2011 9:58 am

Re: Implementing Prefer Flash to already published projects

Post by altman.norris » Mon Nov 12, 2012 7:48 pm

Hopki,

this would just need to be done for the initial pano correct?

User avatar
Hopki
Gnome
Posts: 9653
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Implementing Prefer Flash to already published projects

Post by Hopki » Tue Nov 13, 2012 4:27 pm

Yep the one with the HTML page,
Regards,
Hopki

JNorris
Posts: 12
Joined: Thu Jan 19, 2012 3:09 pm

Re: Implementing Prefer Flash to already published projects

Post by JNorris » Mon Jul 08, 2013 7:32 pm

Hopki,

I'm not having any luck with this change. I replaced this script in the html5 file:

Code: Select all

<script type="text/javascript">
		// check for CSS3 3D transformations
		if (Modernizr.csstransforms3d) {
			// use HTML5 panorama
			document.writeln('<div id="container"></div>');
			pano=new pano2vrPlayer("container");
			skin=new pano2vrSkin(pano);
			pano.readConfigUrl("brown_street-1_out.xml");
			updateOrientation();
			setTimeout(function() { updateOrientation(); }, 10);
			setTimeout(function() { updateOrientation(); }, 1000);
		} else {
			// use Flash panorama
			if (DetectFlashVer(9,0,0)) {
				p2q_EmbedFlash('brown_street-1_out.swf', '100%', '100%',
					'bgcolor', '#f0f0f0',
					'play', 'true',
					'cache','true',
					'allowFullscreen','true',
					'autoplay','true'
					); 
			} else {  // flash is too old or we can't detect the plugin
				document.write('This content requires the Adobe Flash Player Version 9 or higher. ');
			}
		}
		</script>
WITH this script you posted in the thread:

Code: Select all

<script type="text/javascript">
      if (DetectFlashVer(9,0,0)) {
         p2q_EmbedFlash('pano.swf',
            '100%', '100%',
            'bgcolor', '#f0f0f0',
            'play', 'true',
            'cache','true',
            'allowFullscreen','true',
            'autoplay','true'); 
         
      } else 
      // check for CSS3 3D transformations
      if (Modernizr.csstransforms3d) {
   
         // create panorama container 
         document.writeln('<div id="container" style="width:100%;height:100%;"></div>');
         // create the panorama player with the container
         pano=new pano2vrPlayer("container");
         // add the skin object
         skin=new pano2vrSkin(pano);
         // load the configuration
         pano.readConfigUrl("pano.xml");
         // hide the URL bar on the iPhone
         hideUrlBar();
      } else {  
         document.write('This content requires HTML5/CSS3 or Adobe Flash Player Version 9 or higher. ');
      }
      </script>
I've created a seperate test folder in the server with all the files associated and replaced the html5 file but it won't go anywhere. Any ideas? I'm probably overlooking something pretty simple :\

User avatar
360Texas
Moderator
Posts: 3358
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Re: Implementing Prefer Flash to already published projects

Post by 360Texas » Mon Jul 08, 2013 8:30 pm

Could be I am off point but I thought:

the Flash uses the html page
the HTML5 uses the XML page
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com

kris
Posts: 105
Joined: Wed Feb 15, 2012 9:37 am

Re: Implementing Prefer Flash to already published projects

Post by kris » Tue Jul 09, 2013 10:29 am

Hi in the HTML script replace pano.swf & pano.xml file names with yours "brown_street-1_out.xml & brown_street-1_out.swf". rename all to their respective names, it should fix ur problem.

JNorris
Posts: 12
Joined: Thu Jan 19, 2012 3:09 pm

Re: Implementing Prefer Flash to already published projects

Post by JNorris » Tue Jul 09, 2013 10:30 pm

Thanks for the help guys!!! It's been working great so far today. Dumb mistake on my part I guess. I don't usually edit code much and this is a big "renovation" to a bunch of older tours. Cheers! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests