//raadad elsleimans soloution to detecting collisions between objects. onClipEvent (enterFrame) { distancex=_root.box1._x-_root.box2._x //shows distance between objects on x plane distancey=_root.box1._y-_root.box2._y //shows distance between objects on y plane if ((distancex<50) && (distancex>-50) //tests if distance varyies from the width of the object being tested && (distancey<50) && (distancey>-50)){ //in this case being box 1 with a width and height of 50....tested from all 4 possible collision points. _root.indcator.gotoAndStop(2) // <------------------------------ tells indicator box to change colour if collision occours } if (distancex>50){_root.indicator.gotoAndStop(1)} //this tests to see if object is not colliding.. and restors indicator to original color if (distancex<-50){_root.indicator.gotoAndStop(1)} //to idicate no collision being detected if (distancey>50){_root.indicator.gotoAndStop(1)} if (distancey<-50){_root.indicator.gotoAndStop(1)} } //this is a very efficient but not accurate method of collison detection. as this tests the collision between bounding boxes //not the actual vectors themselves. to do _root.indicator it will require a diffrent approach one that i have not explored yet.