0 Replies Latest reply on Dec 10, 2006 1:46 PM by buabco

    Wierd Mouse Move Event Behavior

    buabco Level 1
      Hi!,

      I've got a simple movieclip, compiled in flash 9, that has some elements and a ball clip callerd BALL, I've exported this movieclip for actionscript so I can access it's property's in runtime.

      What I want is to be able to drag the movie clip arround in the screen and for this I'm using actionscript, the idea is that this first movieclip is a SKIN son all the code is in another movieclip that loads the ball movie on runtime.

      Since I want the ball to follow a specific path, that's not a straight line, I'm not using the DRAG command, instead I'm using MOUSEMOVE to calculate the ball position.

      the wierd behavior is that if I do:

      BALL.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);

      It worked fine if I loaded the movieclip from my hard drive, but if I load it from a web server I can only track the mouse when its OUT of the ball Clip, if the mouse is over any element of the BALL clip I don't get the mousemove event.

      I thought it might be a SANDBOX problem, but strangely, if I add the following line:
      BALL.root.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler);

      I don't get a sand box violation and I was able to track the mouse all the time.

      I couldn't find any documentation about any security restrictions for mouse move so I was wondering if this is a correct bheavior or not, or should I have some considerations when handling stage events in loaded clips.

      Thanks

      Buabco