Diesen Tipp in Originalversion zeigen.
Zoom In & Out
Im Folgenden finden Sie einen Code mit zahlreichen Kommentaren, der Ihnen zeigt wie Sie mit Flash zoomen können.
MovieClip.prototype.zoomIn = function(pSpeed, pZoom)
{
this.speed = pSpeed;
this.zoom = pZoom;
this.onEnterFrame = function()
{
this._xscale = this._yscale += this.speed;
if(this._xscale >= this.zoom)
{
this._xscale = this._yscale = this.zoom;
delete this.onEnterFrame;
}
} // onEnterFrame
}; // zoomIn
MovieClip.prototype.zoomOut = function(pSpeed, pZoom)
{
this.speed = pSpeed;
this.zoom = pZoom;
this.onEnterFrame = function()
{
this._xscale = this._yscale -= this.speed;
if(this._xscale <= this.zoom)
{
this._xscale = this._yscale = this.zoom;
delete this.onEnterFrame;
}
} // onEnterFrame
}; // zoomOut
spider_mc.onRollOver = function()
{
this.zoomIn(10, 200);
};
spider_mc.onRollOut = spider_mc.onReleaseOutside = function()
{
this.zoomOut(10, 100);
};
spider_mc.onRelease = function()
{
getURL("http://www.p-creations.com", "_self");
};
Autor: P. Nazari ()
Copyright (c) 2002-2005 by Andreas Schroth
URL: www.computer-tipps.net/webdesign154.html