voila mon code il ne reconnait pas les clip a supprimer
stop(); //Passage de 5 parametres //##################################################################################### // 1- numero du clip (ex : rep1) // 2- numero de la target ( cible ex: target_1) // 3- numero pour l'espacement entre les etikettes ( valable que pour la 3e) // 4,5 - numero target ( valable que pour la 3e etikette car plusieurs choix possible) //##################################################################################### appuyer(1,2,0,2,2) appuyer(2,1,0,1,1) appuyer(3,1,130,2,3) appuyer(4,3,0,3,3)
//##############FONCTION APPUYER process1=false process2=false process3=false function appuyer(obj:Number,tar:Number,espace:Number,tar1:Number,tar2:Number){ rep=this["rep"+obj] for (i=0;i<5;i++) { //Duplication du clip d'origine 5 fois ( pb de profondeur differente pour chaque) rep.duplicateMovieClip("place"+i+obj,10*i+obj); trace(this["place"+i+obj]) btnReponses.onRelease=function() { gotoAndPlay(2); btnReponses._visible=false _root.btnSuite._alpha=100 this["place"+i+obj].removeMovieClip(); }
this["place"+i+obj].onPress=function() { repXdepart=this._x repYdepart=this._y trace(repXdepart) this.startDrag(); } this["place"+i+obj].onRelease=function() { this.stopDrag(); trace(_root["target_"+tar]); res = this.hitTest(_root["target_"+tar]) res1 = this.hitTest(_root["target_"+tar1]) res2 = this.hitTest(_root["target_"+tar2]) //Detection des zones cible if(res) { var my_color:Color = new Color(this.fond); my_color.setRGB(0xCBF5D0,100); // changement de couleur du clip repX=getProperty(_root["target_"+tar],_x) repY=getProperty(_root["target_"+tar],_y) this._x=repX-500+espace this._y=repY-100 this.enabled=false process1=true } else { this._x=repXdepart this._y=repYdepart } if(process1==true&&process2==true&&process3==true) { btnReponses._visible=false _root.btnSuite._alpha=100 }
}//fin du OnRelease }//fin du for }//fin de la fontion
|