Apr
24th
Yazar: admin |
dosya Actionscript
Otomatil zoom için prototype
MovieClip.prototype.ZoomAdd = function (pOption, pDim, pTempo)
{
if (pOption)
{
this.onEnterFrame = function ()
{
if (this._xscale < pDim)
{
this._xscale = this._yscale += pTempo;
}
else
{
this._xscale = this._yscale = pDim;
delete this.onEnterFrame;
}
};
}
else
{
this.onEnterFrame = function ()
{
if (this._xscale > pDim)
{
this._xscale = this._yscale -= pTempo;
}
else
{
this._xscale = this._yscale = pDim;
delete this.onEnterFrame;
}
};
}
};
ASSetPropFlags(MovieClip.prototype, "ZoomAdd", 1);
{
if (pOption)
{
this.onEnterFrame = function ()
{
if (this._xscale < pDim)
{
this._xscale = this._yscale += pTempo;
}
else
{
this._xscale = this._yscale = pDim;
delete this.onEnterFrame;
}
};
}
else
{
this.onEnterFrame = function ()
{
if (this._xscale > pDim)
{
this._xscale = this._yscale -= pTempo;
}
else
{
this._xscale = this._yscale = pDim;
delete this.onEnterFrame;
}
};
}
};
ASSetPropFlags(MovieClip.prototype, "ZoomAdd", 1);
// Useage
mc3.onRollOver = function ()
{
this.ZoomAdd (true, 200, 6);
// ZoomIn (true)
};
mc3.onRollOut = function ()
{
this.ZoomAdd (false, 100, 6);
// ZoomOUt (false)
};
Burada Havadan Sudan Bahsedip yormadim sizi zmler ve sonular var