0 Replies Latest reply on Aug 1, 2006 12:16 PM by SLMHILL

    Overlapping/Target Problem

    SLMHILL Level 1
      Please tell me what's wrong with my script.....

      on (press) {
      startDrag("_root.b1", true);
      }
      on (release) {
      stopDrag();
      }
      ifbOverlap:Boolean = b1.hitTest(bowl2);
      setProperty("_root.b1",_x,"182.8");
      setProperty("_root.b1",_y,"188.3");
      tellTarget("_root.WELLDONE"){
      play();
      }
      }

      If the b1 instance is dropped on bowl2, I want it to play the WELLDONE mc.

      Errors.........

      **Error** Scene=Scene 1, layer=b1, frame=1:Line 7: '(' expected
      if bOverlap:Boolean = b1.hitTest(bowl2);

      **Error** Scene=Scene 1, layer=b1, frame=1:Line 8: Statement must appear within on/onClipEvent handler
      setProperty("_root.b1",_x,"182.8");

      **Error** Scene=Scene 1, layer=b1, frame=1:Line 9: Statement must appear within on/onClipEvent handler
      setProperty("_root.b1",_y,"188.3");

      **Error** Scene=Scene 1, layer=b1, frame=1:Line 10: Statement must appear within on/onClipEvent handler
      tellTarget("_root.WELLDONE"){

      **Error** Scene=Scene 1, layer=b1, frame=1:Line 13: Unexpected '}' encountered
      }

      Total ActionScript Errors: 5 Reported Errors: 5

      Thanks