Swap depths
Hej.Hvordan bruger man swap depths. Jeg har lavet dette script på nogle mcs ved siden af hinanden.
De vokser jo tættere musen er på dem. Men de skal også være øverst, når deres _xscale/_yscale er størst.
onClipEvent(enterFrame) {
afstandx = Math.abs(_root._xmouse - this._x);
afstandy = Math.abs(_root._ymouse - this._y);
afstand = afstandx+afstandy;
setProperty(this, _xscale, (100-afstand+25));
setProperty(this, _yscale, (100-afstand+25));
if(this._yscale < 25) {
this._yscale = 25;
}
if(this._xscale < 25) {
this._xscale = 25;
}
if(this._yscale > 100) {
this._yscale = 100;
}
if(this._xscale > 100) {
this._xscale = 100;
}
}
Se det her: www.legende.dk/portfolio.html
