1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| for (var nbId = 0; nbId < 16; nbId++) {
// ---------------------------------
// ------- CREATION DES MC ---------
// ---------------------------------
this.attachMovie('mcCarre', 'mcCarre' + nbId, nbId);
var mcTmp = this['mcCarre' + nbId];
mcTmp.txIdPage.text = nbId;
mcTmp._x = (nbId * 30) + 30;
mcTmp._y = 200;
// ---------------------------------
// ------- EVENEMENTS ---------
// ---------------------------------
mcTmp.onRollOver = function() {
this.onEnterFrame = function() {
if (this._xscale > 150) {
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.onEnterFrame = function() {
this._yscale -= 5;
this._xscale -= 4;
if (this._xscale <= 100) {
delete this.onEnterFrame;
this._yscale = this._xscale = 100;
this.swapDepths(Number(this.txNum.text));
}
};
}
} else {
this._yscale += 10;
this._xscale += 8;
}
};
this.swapDepths(this._parent.getNextHighestDepth());
};
} |
Partager