carookee - group communication for you
Home / JavaForum / Beginner
Infos   |   Features   |   Gold-Edition   |   Kundenservice   
java
  Übersicht
  Forum
Beginner
Java allgemein
JDBC
JNI
Networking
Online-Ressourcen
Swing + AWT
XML
Meckerecke
  Mitglieder
LOGIN





· Passwort vergessen
· Kostenlos anmelden
  Information
  Demo
  Features
  Im Vergleich
  Anmeldung
SUCHE
Beiträge, Foren oder Verfasser finden:
  Kundenservice
  Impressum
  Datenschutz
  AGB
Status
5.046 User online
0 User eingeloggt
 

Beiträge
   Antworten     Neuer Beitrag    

Beitrag 2840 von 2963 (96%) |<   <   >   >|

Autor id-diacos
Datum 21.08.03, 19:47
Betreff verlinken eines animierten gif's in einen script


hallo,

ich hoffe jemand kann mir hier etwas helfen. es geht mir um folgendes script:




</script> <script
LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!-- ... Quelle Beispiel ...
// Browserabhaengige Informationen
var nn = (navigator.appName == "Netscape") ? true : false
// Bildinformationen
var imgURL = "clickhere.gif" <<<<auf diesen bild würde ich gerne einen link setzen geht das??
var imgWidth = 100
var imgHeight = 57
// Darstellungsinformationen
var imgStep = 50 // Zeitintervall in ms
var imgIntX = 200 // horizontales Intervall
var imgIntY = 450 // vertikales Intervall
// Statusinformationen
var imgIncX = 0
var imgIncY = 0
// Zentrieren des Hintergrundbilds
function bgstep()
{
var iWidth = (nn ? innerWidth : Number(document.body.clientWidth))
var iHeight = (nn ? innerHeight : Number(document.body.clientHeight))
with(nn ? document.Bild : Bild)
{
// Platz fuer die Darstellung?
if(imgWidth > iWidth ||
imgHeight > iHeight)
{
visibility = false
return
}
// Koordinatenberechnung
if(nn)
{
left = Math.floor((1 + Math.sin(imgIncX * 2 * Math.PI / imgIntX)) * ((innerWidth - imgWidth) / 2))
top = Math.floor((1 + Math.cos(imgIncY * 2 * Math.PI / imgIntY)) * ((innerHeight - imgHeight) / 2))
}
else
{
style.left = Math.floor((1 + Math.sin(imgIncX * 2 * Math.PI / imgIntX)) * ((iWidth - imgWidth) / 2))
style.top = Math.floor((1 + Math.cos(imgIncY * 2 * Math.PI / imgIntY)) * ((iHeight - imgHeight) / 2))
}
// Naechster Schritt
imgIncX++
imgIncY++
imgIncX %= imgIntX
imgIncY %= imgIntY
visibility = true
}
setTimeout("bgstep()", imgStep)
}
// Initialisierung der Darstellung
function bglayer()
{
var iWidth = (nn ? innerWidth : Number(document.body.clientWidth))
var iHeight = (nn ? innerHeight : Number(document.body.clientHeight))
with(nn ? document.Bild : Bild)
{
if(nn)
{
left = Math.floor((iWidth - imgWidth) / 2)
top = Math.floor(iHeight - imgHeight)
width = imgWidth
height = imgHeight
with(document)
{
open("text/html")
write("<IMG SRC=\"" + imgURL + "\" " +
"WIDTH=" + imgWidth + " " +
"HEIGHT=" + imgHeight + " ALT=\"\">")
close()
}
}
else
{
style.left = Math.floor((iWidth - imgWidth) / 2)
style.top = Math.floor(iHeight - imgHeight)
style.width = imgWidth
style.height = imgHeight
innerHTML = "<IMG SRC=\"" + imgURL + "\" " +
"WIDTH=" + imgWidth + " " +
"HEIGHT=" + imgHeight + " ALT=\"\">"
}
setTimeout("bgstep()", imgStep)
}
}
// -->
</script>
<small>dieses skript bewegt ein beliebiges logo im hintergrund einer
homepage</small></font></p>



Diskussionsverlauf:
    Re: verlinken eines animierten gif's in einen script
verlinken eines animierten gif's in einen script

 Auf diesen Beitrag antworten
 Neuen Beitrag verfassen


|<   <   >   >|

                                                                                                                                                                                                                           

Impressum  · Datenschutz  · AGB  · Infos  · Presse
Ein modernes Forum: teamturn.com