Tobias Menzel
Erfahrenes Mitglied
Hä? Wie meinst Du das: was soll sich wann ständig ändern?[..] nicht nur die Farbe vom Text ändert, sonder ständig ändert.
.
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Hä? Wie meinst Du das: was soll sich wann ständig ändern?[..] nicht nur die Farbe vom Text ändert, sonder ständig ändert.
fadeTo(-100, 5);
function fadeTo(d, s) {
this.onEnterFrame = function() {
tr.rb += (d - tr.rb) / s;
tr.gb = tr.bb = tr.rb;
cl.setTransform(tr);
if (Math.abs(d - tr.rb) < 1) {
tr.rb = tr.gb = tr.bb = d;
cl.setTransform(tr);
fadeTo((d < 0)? 0 : -100, 5);
}
}
}
this.useHandCursor = false;
var by = this._y;
var that = this;
but1._caption = "Leistung 1";
but2._caption = "Leistung 2";
but3._caption = "Nummer 3";
but4._caption = "Nummer 4";
function pressed(obj) {
switch(obj) {
case but1: getURL("link1.htm"); break;
case but2: getURL("link2.htm"); break;
case but3: getURL("link3.htm"); break;
case but4: getURL("link4.htm"); break;
}
}
this.onEnterFrame = function() {
if (butover || bgndover) {
slide(by - 95, 3);
} else {
slide(by, 5);
}
}
var bgndover = false;
var butover = false;
bgnd.onRollOver = function() {
bgndover = true;
}
bgnd.onRollOut = bgnd.onDragOut = function() {
bgndover = false;
}
function slide(dy, s) {
bgnd.onEnterFrame = function() {
that._y += (dy - that._y) / s;
if (Math.abs(dy - that._y) < 1) {
that._y = dy;
delete this.onEnterFrame;
}
}
}
this.onRollOver = function() {
fadeTo(-100, 5);
_parent.butover = true;
}
this.onRollOut = this.onDragOut = function() {
fadeTo(0, 7);
_parent.butover = false;
}
this.useHandCursor = false;
this.onEnterFrame = function() {
if (_caption != undefined) {
btext.text = _caption;
delete this.onEnterFrame;
}
}
this.onRollOver = function() {
fadeTo(-100, 5);
_parent.butover = true;
}
this.onRollOut = this.onDragOut = function() {
fadeTo(0, 7);
_parent.butover = false;
}
this.onRelease = function() {
_parent.pressed(this);
}
var cl = new Color(this);
var tr = cl.getTransform();
function fadeTo(d, s, _callback, _cbp) {
this.onEnterFrame = function() {
tr.rb += (d - tr.rb) / s;
tr.gb = tr.bb = tr.rb;
cl.setTransform(tr);
if (Math.abs(d - tr.rb) < 1) {
tr.rb = tr.gb = tr.bb = d;
cl.setTransform(tr);
delete this.onEnterFrame;
_callback(_cbp);
}
}
}
this.useHandCursor = false;
this.onEnterFrame = function() {
if (_caption != undefined) {
btext.text = _caption;
delete this.onEnterFrame;
}
}
this.onRollOver = function() {
fadeTo(-100, 5);
_parent.butover = true;
}
this.onRollOut = this.onDragOut = function() {
fadeTo(0, 7);
_parent.butover = false;
}
this.onRelease = function() {
_parent.pressed(this);
}
var cl = new Color(this);
var tr = cl.getTransform();
function fadeTo(d, s, _callback, _cbp) {
this.onEnterFrame = function() {
tr.rb += (d - tr.rb) / s;
tr.gb = tr.bb = tr.rb;
cl.setTransform(tr);
if (Math.abs(d - tr.rb) < 1) {
tr.rb = tr.gb = tr.bb = d;
cl.setTransform(tr);
delete this.onEnterFrame;
_callback(_cbp);
}
}
}
this.useHandCursor = false;
this.onEnterFrame = function() {
if (_caption != undefined) {
btext.text = _caption;
delete this.onEnterFrame;
}
}
this.onRollOver = function() {
fadeTo(-100, 5);
_parent.butover = true;
}
this.onRollOut = this.onDragOut = function() {
fadeTo(0, 7);
_parent.butover = false;
}
this.onRelease = function() {
_parent.pressed(this);
}
var cl = new Color(this);
var tr = cl.getTransform();
function fadeTo(d, s, _callback, _cbp) {
this.onEnterFrame = function() {
tr.rb += (d - tr.rb) / s;
tr.gb = tr.bb = tr.rb;
cl.setTransform(tr);
if (Math.abs(d - tr.rb) < 1) {
tr.rb = tr.gb = tr.bb = d;
cl.setTransform(tr);
delete this.onEnterFrame;
_callback(_cbp);
}
}
}