0 Replies Latest reply on Jun 1, 2007 4:41 PM by DJ Gecko

    localToGlobal and hitTest

    DJ Gecko Level 1
      Hello, I'm having problems with localToGlobal. I'm trying to do a hit test with a movie clip that is within another movie clip. The localToGlobal method only returns the ._x and ._y coordinates of the movie clip inside its parent and not on the main root, or stage.

      var pt:Object = new Object ();
      pt.ptX = circMC.circMC._x;
      pt.ptY = circMC.circMC._y;
      localToGlobal (pt);
      trace("circMC._x: "+circMC._x+", circMC._y: "+circMC._y);
      trace("circMC.circMC._x: "+circMC.circMC._x+", circMC.circMC._y: "+circMC.circMC._y);
      trace("pt.ptX: "+pt.ptX+", pt.ptY: "+pt.ptY);
      if (ground.hitTest (pt.ptX, pt.ptY, true)) {
      trace ("hit test true");
      } else {
      trace ("hit test FALSE");

      What am I doing wrong?