JavaScripts -> Bilder -> 360°-Panorama-Scroller
Mit dem Panorama Scroller kann man 360°-Panorama-Bilder "endlos" scrollen.
Hinweis: Der Panorama-Scroller funktioniert im Internet Explorer anscheinend nur im "Quirks Mode", also auf nicht standardkonformen Seiten.
Kompatibilität getestet:
Script-Code
<script type="text/javascript">
<!--
// = = ====================================================================== = =
// = = Panorama Scroller v1.0 (c) 2004 Triple-M / http://www.htmlarsenal.de = =
// = = ====================================================================== = =
// ------------------------------------------------------------------------------
// -- Dieses Script und viele andere im --
// -- This script and many more in the --
// ------------------------------------------------------------------------------
// -- HTML ARSENAL - Die Quelle für HTML, JavaScript, PHP --
// -- HTML ARSENAL - Your Source for HTML, JavaScript, PHP --
// ------------------------------------------------------------------------------
// -- -= http://www.htmlarsenal.de =- --
// ------------------------------------------------------------------------------
// Sie dürfen dieses Script für nicht-kommerzielle Zwecke nutzen, wenn diese Urheber-Notiz erhalten bleibt.
// You may use this Script for non-commercial causes as long as you include this copyright notice.
// Benutzung / Usage:
// ==================
// Fügen Sie an der Stelle Ihres Dokumentes, an der der Scroller erscheinen soll, ein Script mit dem Inhalt panorama(); ein
// Include a script with the content panorama(); at the position of your document where the scroller shall be displayed.
// Veränderbare Einstellungen / Adjustable Settings
// ================================================
var imw=430; // Breite des Panorama-Bildes / Width of panorama image
var imh=78; // Höhe des Panorama-Bildes / Height of panorama image
var paw=90; // Breite des Ausgabebereiches / Width of output area
var pah=78; // Höhe des Ausgabebereiches / height of output area
var arurl="/pics/examples/ar.gif"; // Bild "Pfeil Rechts" / Image "arrow right"
var alurl="/pics/examples/al.gif"; // Bild "Pfeil Links" / Image "arrow left"
var imgurl="/pics/examples/360.jpg"; // Panorama-Bild (360°) / panorama image (360°)
// Script-Code
// ===========
// Ab hier bitte nichts mehr verändern
// Please do not change anything from here on
var pi=0;
function scroll(x) {
var ll=parseInt(document.getElementById("pa1").style.left);
ll+=x;
if(ll>0)ll-=imw;
if(ll<(0-imw))ll+=imw;
document.getElementById("pa1").style.left=(ll)+"px";
document.getElementById("pa2").style.left=(ll+imw)+"px";
}
function panoramaleft() {
if(pi)window.clearInterval(pi);
pi=window.setInterval('scroll(5)',50);
}
function panoramaright() {
if(pi)window.clearInterval(pi);
pi=window.setInterval('scroll(-5)',50);
}
function panoramastop() {
if(pi) {
window.clearInterval(pi);
pi=0;
}
}
function panorama() {
document.write('<table style="border-collapse:collapse"><tr><td style="padding:0px"><img src="'+alurl+'" onMouseOver="panoramaleft()" onMouseOut="panoramastop()"></td><td style="padding:0px; width:'+paw+'px">');
document.write('<div style="overflow:hidden; width:'+paw+'px; height:'+pah+'px;">');
document.write('<img src="'+imgurl+'" id="pa1" style="position:relative; left:0px; top:0px"><img src="'+imgurl+'" id="pa2" style="position:relative; left:'+imw+'px; top:-'+imh+'px">');
document.write('</div>');
document.writeln('</td><td style="padding:0px"><img src="'+arurl+'" onMouseOver="panoramaright()" onMouseOut="panoramastop()"></td></tr></table>');
}
// ----------------------------
// -- Ende / End Script-Code --
// ----------------------------
// -- Panorama Scroller --
// -- Author: Triple-M --
// -- www.htmlarsenal.de --
// -- 24.Mar.2004 --
// ----------------------------
//-->
</script>
<!--
// = = ====================================================================== = =
// = = Panorama Scroller v1.0 (c) 2004 Triple-M / http://www.htmlarsenal.de = =
// = = ====================================================================== = =
// ------------------------------------------------------------------------------
// -- Dieses Script und viele andere im --
// -- This script and many more in the --
// ------------------------------------------------------------------------------
// -- HTML ARSENAL - Die Quelle für HTML, JavaScript, PHP --
// -- HTML ARSENAL - Your Source for HTML, JavaScript, PHP --
// ------------------------------------------------------------------------------
// -- -= http://www.htmlarsenal.de =- --
// ------------------------------------------------------------------------------
// Sie dürfen dieses Script für nicht-kommerzielle Zwecke nutzen, wenn diese Urheber-Notiz erhalten bleibt.
// You may use this Script for non-commercial causes as long as you include this copyright notice.
// Benutzung / Usage:
// ==================
// Fügen Sie an der Stelle Ihres Dokumentes, an der der Scroller erscheinen soll, ein Script mit dem Inhalt panorama(); ein
// Include a script with the content panorama(); at the position of your document where the scroller shall be displayed.
// Veränderbare Einstellungen / Adjustable Settings
// ================================================
var imw=430; // Breite des Panorama-Bildes / Width of panorama image
var imh=78; // Höhe des Panorama-Bildes / Height of panorama image
var paw=90; // Breite des Ausgabebereiches / Width of output area
var pah=78; // Höhe des Ausgabebereiches / height of output area
var arurl="/pics/examples/ar.gif"; // Bild "Pfeil Rechts" / Image "arrow right"
var alurl="/pics/examples/al.gif"; // Bild "Pfeil Links" / Image "arrow left"
var imgurl="/pics/examples/360.jpg"; // Panorama-Bild (360°) / panorama image (360°)
// Script-Code
// ===========
// Ab hier bitte nichts mehr verändern
// Please do not change anything from here on
var pi=0;
function scroll(x) {
var ll=parseInt(document.getElementById("pa1").style.left);
ll+=x;
if(ll>0)ll-=imw;
if(ll<(0-imw))ll+=imw;
document.getElementById("pa1").style.left=(ll)+"px";
document.getElementById("pa2").style.left=(ll+imw)+"px";
}
function panoramaleft() {
if(pi)window.clearInterval(pi);
pi=window.setInterval('scroll(5)',50);
}
function panoramaright() {
if(pi)window.clearInterval(pi);
pi=window.setInterval('scroll(-5)',50);
}
function panoramastop() {
if(pi) {
window.clearInterval(pi);
pi=0;
}
}
function panorama() {
document.write('<table style="border-collapse:collapse"><tr><td style="padding:0px"><img src="'+alurl+'" onMouseOver="panoramaleft()" onMouseOut="panoramastop()"></td><td style="padding:0px; width:'+paw+'px">');
document.write('<div style="overflow:hidden; width:'+paw+'px; height:'+pah+'px;">');
document.write('<img src="'+imgurl+'" id="pa1" style="position:relative; left:0px; top:0px"><img src="'+imgurl+'" id="pa2" style="position:relative; left:'+imw+'px; top:-'+imh+'px">');
document.write('</div>');
document.writeln('</td><td style="padding:0px"><img src="'+arurl+'" onMouseOver="panoramaright()" onMouseOut="panoramastop()"></td></tr></table>');
}
// ----------------------------
// -- Ende / End Script-Code --
// ----------------------------
// -- Panorama Scroller --
// -- Author: Triple-M --
// -- www.htmlarsenal.de --
// -- 24.Mar.2004 --
// ----------------------------
//-->
</script>