Page 1 of 1

Automatisches Umschalten von flash auf html5 ??

Posted: Fri Aug 06, 2010 12:18 pm
by soulbrother
Hallo, Thomas schreibt ja auf der Seite:

http://gardengnomesoftware.com/pano2vr_3_sample.php

"Virtual Tour optimized for the web browser. Automatic switching for Flash and HTML5."

Wie darf man sich das vorstellen ?

Ist das ein code, der abfrägt ob der surfer Besucher das herkömmliche flash oder besser das html5 angezeigt bekommen soll.

Kann man den code auch in eigene "normale" html-Seiten einbauen?
Ist es eine Art "Weiche" die dann zur richtigen html-seite weiterleitet?

wird dazu was anderes als html benötigt ( php oder css oder sonst was?)

Könnte diese Funktion und die Anwendung hier kurz erklärt werden - für Dummies halt...

Danke - an wen auch immer !!

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Sat Aug 07, 2010 7:14 pm
by cocos
jaaaa, das würde mich auch brennend interessieren!!! :D

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Thu Aug 19, 2010 11:47 pm
by darkangel815
Hi,

hab das aus dem Beispiel extrahiert und bei mir in ne html eingebaut. Funkt gut.

Code: Select all

   .....
        	<script type="text/javascript">
			function updateOrientation() {
				switch(window.orientation) {
					case  90:
					case -90:
						if (window.pageYOffset==0) {
							window.scrollTo(0, 1);
						}
					break;
					default:
						if (window.pageYOffset==0) {
							window.scrollTo(0, 1);
						}
					break;		
				}
			}
		</script>
	</head>
<body onorientationchange="setTimeout(function() { updateOrientation(); }, 10);" >
<script language="javascript"  src="p2q_embed_object.js"></script>
<script type="text/javascript" src="pano2vr_player.js"></script>
<script type="text/javascript" src="modernizr-1.5.min.js"></script>
<script type="text/javascript" src="skin.js"></script>

<script type="text/javascript">
	if (Modernizr.csstransforms3d) {
		document.writeln('<div id="container" style="width:970px;height:448px;margin:0px;padding:0px;"></div>');
		pano=new pano2vrPlayer("container");
		skin=new pano2vrSkin(pano);
		pano.readConfigUrl("pano1_1.xml");
	//			pano.readConfigString(panorama);
		updateOrientation();
		setTimeout(function() { updateOrientation(); }, 10);
		setTimeout(function() { updateOrientation(); }, 1000);
	} else {
		if (DetectFlashVer(9,0,0)) {
		document.writeln('<div id="container" style="width:970px;height:448px;margin:-16px 0px;padding:0px;">');
			document.writeln('Flash 9 Panorama:<br>');
			p2q_EmbedFlash('pano1_1.swf', '970', '448',
				'bgcolor', '#f0f0f0',
				'play', 'true',
				'cache','true',
				'allowFullscreen','true',
				'autoplay','true');
		document.writeln('</div>');

		} else {  // flash is too old or we can't detect the plugin
			var alternateContent = 'This content requires the Adobe Flash Player Version 9 or higher. ';
			document.write(alternateContent);  // insert non-flash content
		}
	}
</script>
Das das geht muss man noch modernizer http://www.modernizr.com/ runter laden.

Gruß
Oliver

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Sun Nov 14, 2010 10:30 am
by soulbrother
Gibt es denn bereits (oder bald, aber wann?) eine ggt Vorlage, welche diese Funktion (mit modernizer )bereits enthält ?

Ich denke mich zu erinnern, dass Thomas irgendwo mal schrieb, es sollte "bald" eine ggt (html) Vorlage kommen, in der es funktioniert...
.......................................................................
SAME in english language:

Is there already a ggt (html) template somewhere (or will it be shortly supplied?) that includes the modernizer script ?

I´m already shure that I have read from Thomas, that it should be supplied "soon".

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Wed Nov 17, 2010 11:04 pm
by thomas
In der beta 3 hat die "normal.ggt" bei HTML5 den modernizr bereits eingebaut. Du brauchst nur noch das Fallback SWF angeben.

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Thu Jan 06, 2011 1:15 pm
by Ingo
Ah ok, mit der Erklärung versteh sogar ich das.

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Sun Jan 23, 2011 3:44 pm
by soulbrother
Ein spätes: Danke !

an Thomas

Re: Automatisches Umschalten von flash auf html5 ??

Posted: Tue Feb 22, 2011 12:47 pm
by AlexK
Ich aber nicht so ganz :)
Ich mache es derzeit so, dass ich die SWF erstelle und für z.b. das iPad, iPhone eine HTML5 Version. Auf meiner Seite verlinke ich dann beide Panos. Ist das überhaupt so notwendig? Ich würde lieber nur ein Pano erstellen, was dann für Smartphones und das Betrachten am Rechner geeignet ist. Kann man das so realisieren?