Diesen Tipp in Originalversion zeigen.
Schwebendes Menü
Im Folgenden finden Sie ein Beispiel für ein schwebendes Menü:
_global.tl = this;
_global.w = 550; // Stage-Breite
_global.h = 400; // Stage-Höhe
navi_mc.onMouseMove = function()
{
this.onEnterFrame = function()
{
if (this._currentFrame == 1)
{
this._x += (_global.tl._xmouse - this._x) / 5;
this._y += (_global.tl._ymouse - this._y) / 5;
}
if ( (Math.abs(this._x - _root._xmouse) < 1) &&
(Math.abs(this._y - _root._ymouse) < 1) )
{
this._x = _root._xmouse;
this._y = _root._ymouse;
delete this.onEnterFrame;
}
// Grenzen setzen
if (this._x < 0) this._x = 0;
if (this._x > _global.w) this._x = _global.w;
if (this._y < 0) this._y = 0;
if (this._y > _global.h) this._y = _global.h;
}; // onEnterFrame
}; // onMouseMove
Autor: P. Nazari ()
Copyright (c) 2002-2005 by Andreas Schroth
URL: www.computer-tipps.net/webdesign157.html