mardi 30 juin 2015

Check if hitTestObject finished with all the elements of an array

I have an array with seven movieclips that hitTestObject a movieclip called ousiastikaChest. That's works fine. I want to check if all elements of that array had hitTestObject so a well done message to appear. This part of my code is wrong. Can anyone help me? Thank you

This is my code

 var circles:Array = [ous1,ous2,ous3,ous4,ous5,ous6,ous7];
 for each(var circleMC:MovieClip in circles)
     circleMC.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
     circleMC.addEventListener(MouseEvent.MOUSE_UP, dropIt);
     circleMC.startX = circleMC.x;
     circleMC.startY = circleMC.y;

 function pickUp(event:MouseEvent):void


function dropIt(event:MouseEvent):void

     if({ = false; = 0  = ousiastikaChest.x; = ousiastikaChest.y;
     { =; =; = true;
 //problem with that part of the code
 for(var i:int = 0; i<circles.length;i++){
         feedback.text="Well Done";

Aucun commentaire:

Enregistrer un commentaire