
Код:
var mos = new Array(_root.mc1, _root.mc2, _root.mc3, _root.mc4, _root.mc5);
for (i in mos) {
mos[i].onRollOver = vl;
mos[i].onRollOut = vli;
}
function fadeOut() {
if (this._alpha>0) {
this._alpha -= 20;
} else {
this._visible = false;
}
}
function fadeIn() {
if (this._alpha<100) {
this._alpha += 10;
}
}
function vl() {
this._xscale = 300;
this._yscale = 300;
for (i in mos) {
if (mos[i] != this) {
mos[i].onEnterFrame = fadeOut;
}
}
}
function vli() {
this._xscale = 100;
this._yscale = 100;
for (var i in mos) {
if (mos[i] != this) {
mos[i]._visible = true;
mos[i].onEnterFrame = fadeIn;
}
}
}