Flash hitTest is off because of Presenter menu

Hi everyone,

I ran into a problem when developing a small rollOver-rollOut menu for a course. 

It uses a very simple AS2 construct:

   if ( menu_button.hitTest(this._xmouse, this._ymouse) ) {  do_something() }

However, when I insert it on slide and publish, mouse detection is off by X=260px and Y=40px. Right now I am using a crude workaround like this: 

   if ( menu_button.hitTest(this._xmouse+265, this._ymouse+40) ) {  do_something() }

But I am sure I am missing something. Can anyone help? I attached the SWF and FLA (CS5).

Thank you in advance!

3 Replies
David Anderson

Hey Brian

I'm guessing the reason it's off is because the course player is based on a Flash file that's sized at 980x640. If you create a new movie, 980x640, then your relative positions should be okay.

Here's a similar tutorial and source file that uses Load Movie to load .swf files over the slide:

You can download the source file from this thread.

Brian Griffin

Um, okay, I'll give it a try, thank you very much.

But all my other movies are 720x540 so they fit the slide exactly, and I've never had any problems with any functionality except for the hitTest. I am quite sure that this._xmouse should be replaced with something like _root. or _parent._parent but I tried a few combinations and got completely lost in movieclip inheritance in Articulate Player.

I really do not want to build movies that are larger than the slide.