lmsbxt 0 Denunciar post Postado Novembro 9, 2006 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 Compartilhar este post Link para o post Compartilhar em outros sites
the_flash 0 Denunciar post Postado Novembro 9, 2006 Deixa eu ver se entendi...você quer executar uma ação se um mc se colidir com qualquer outro dos 12 do loop? Compartilhar este post Link para o post Compartilhar em outros sites