Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
salve galera..
esse codigo ta funcionando
carta.onPress = function() { this.swapDepths(getNextHighestDepth()); this.startDrag(); }; carta.onRelease = function() { this.stopDrag(); if (this.hitTest(container)) { status_mc.gotoAndPlay("certo"); } else { status_mc.gotoAndPlay("errado"); this._x = 15; this._y = 226; } };
mas se eu colocá-lo dentro de um loop ele nao funciona
for (i=1; i<=12; i++) { //definicao das variaveis var carta = this["carta"+i]; var container = this["container"+i]; //algoritimo do loop //trace(carta); carta.onPress = function() { this.swapDepths(getNextHighestDepth()); this.startDrag(); }; carta.onRelease = function() { this.stopDrag(); if (this.hitTest(container)) { status_mc.gotoAndPlay("certo"); } else { status_mc.gotoAndPlay("errado"); this._x = 15; this._y = 226; } };}alguém aí dá uma luz por favor...
valeew
Carregando comentários...