JavaScripts -> Texteffekt -> StarWars-Scroller
Mit diesem Script kann ein Text im Stile des Einführungs-Textes in "Star Wars" gescrollt werden.
Kompatibilität getestet:
Script-Code
<script type="text/javascript">
<!--
// = = ====================================================================== = =
// = = StarWars 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 =- --
// ------------------------------------------------------------------------------
// BENUTZUNG
// =========
// Passen Sie zunächst den Text an (Im Abschnitt "Veränderbare Einstellungen").
// Fügen Sie dann in den Body-Bereich ein Script mit dem Inhalt
// swscroll()
// ein.
// USAGE
// =====
// At first, you have to adjust the text (In the "adjustable settings" area).
// Afterwards, include a script with the content
// swscroll()
// in the body of your document.
// Veränderbare Einstellungen / Adjustable Settings
// ================================================
// Der Text / the text
// Zeilen können verändert, hinzugefügt und entfernt werden und können HTML enthalten
// Lines may be changed, added or removed and may contain HTML
var swtext=new Array(
"HTML Arsenal",
"Die Quelle für HTML,",
"JavaScript und PHP",
"",
"Anleitungen",
"Workshops",
"Scripts",
"Downloads",
"Tools",
"und vieles mehr",
"",
"Kostenlose Services:",
"Textcounter",
"und",
"Formmailer",
"",
"NEU:",
"Templates",
"und",
"Grafiken",
"zum kostenlosen",
"Download!",
"",
"HTML Arsenal",
"http://www.htmlarsenal.de"
);
var swfont="Verdana,sans-serif"; // Schriftart / font
var swcolor="#c02020"; // Schriftfarbe / font color
var swspd=75; // Geschwindigkeit / speed
// Script-Code
// ===========
// Ab hier bitte nichts mehr verändern
// Please do not change anything from here on
var swp=0;
function swsup() {
swp++;
for(i=0;i<swtext.length;i++) {
if((swp-15*i)/50>=0) {
document.getElementById("sw_"+i).style.top=(50+50/Math.pow(2,(swp-15*i)/50))+"%";
document.getElementById("sw_"+i).style.fontSize=Math.round(60/Math.pow(2,(swp-15*i)/50))+"px";
}
}
}
function swscroll() {
document.write('<div style="position:absolute; left:0px; top:0px; width:100%; height:100%; overflow:hidden">');
for(var i=0;i<swtext.length;i++) {
document.write('<div style="position:absolute; top:100%; left:0px; width:100%; text-align:center; font-size:60px; font-family:'+swfont+'; color:'+swcolor+'" id="sw_'+i+'">'+swtext[i]+'<\/div>');
}
document.write('<\/div>');
window.setInterval("swsup()",swspd);
}
// ----------------------------
// -- Ende / End Script-Code --
// ----------------------------
// -- StarWars Scroller --
// -- Author: Triple-M --
// -- www.htmlarsenal.de --
// -- 24.Mar.2004 --
// ----------------------------
//-->
</script>
<!--
// = = ====================================================================== = =
// = = StarWars 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 =- --
// ------------------------------------------------------------------------------
// BENUTZUNG
// =========
// Passen Sie zunächst den Text an (Im Abschnitt "Veränderbare Einstellungen").
// Fügen Sie dann in den Body-Bereich ein Script mit dem Inhalt
// swscroll()
// ein.
// USAGE
// =====
// At first, you have to adjust the text (In the "adjustable settings" area).
// Afterwards, include a script with the content
// swscroll()
// in the body of your document.
// Veränderbare Einstellungen / Adjustable Settings
// ================================================
// Der Text / the text
// Zeilen können verändert, hinzugefügt und entfernt werden und können HTML enthalten
// Lines may be changed, added or removed and may contain HTML
var swtext=new Array(
"HTML Arsenal",
"Die Quelle für HTML,",
"JavaScript und PHP",
"",
"Anleitungen",
"Workshops",
"Scripts",
"Downloads",
"Tools",
"und vieles mehr",
"",
"Kostenlose Services:",
"Textcounter",
"und",
"Formmailer",
"",
"NEU:",
"Templates",
"und",
"Grafiken",
"zum kostenlosen",
"Download!",
"",
"HTML Arsenal",
"http://www.htmlarsenal.de"
);
var swfont="Verdana,sans-serif"; // Schriftart / font
var swcolor="#c02020"; // Schriftfarbe / font color
var swspd=75; // Geschwindigkeit / speed
// Script-Code
// ===========
// Ab hier bitte nichts mehr verändern
// Please do not change anything from here on
var swp=0;
function swsup() {
swp++;
for(i=0;i<swtext.length;i++) {
if((swp-15*i)/50>=0) {
document.getElementById("sw_"+i).style.top=(50+50/Math.pow(2,(swp-15*i)/50))+"%";
document.getElementById("sw_"+i).style.fontSize=Math.round(60/Math.pow(2,(swp-15*i)/50))+"px";
}
}
}
function swscroll() {
document.write('<div style="position:absolute; left:0px; top:0px; width:100%; height:100%; overflow:hidden">');
for(var i=0;i<swtext.length;i++) {
document.write('<div style="position:absolute; top:100%; left:0px; width:100%; text-align:center; font-size:60px; font-family:'+swfont+'; color:'+swcolor+'" id="sw_'+i+'">'+swtext[i]+'<\/div>');
}
document.write('<\/div>');
window.setInterval("swsup()",swspd);
}
// ----------------------------
// -- Ende / End Script-Code --
// ----------------------------
// -- StarWars Scroller --
// -- Author: Triple-M --
// -- www.htmlarsenal.de --
// -- 24.Mar.2004 --
// ----------------------------
//-->
</script>