I am loading a dropdown menu into another swf and position it on the scene. Now the hittest returns always false, because the menu coordinates have changed. I cannot figure out how to convert the coordinates.
I load the menu into menu_mc.
The menu has the clip myMenu on the scene.
I define the mouse listener on the scene.
In myMenu I have the clip menu_holder into which I attach mcs for the entries.
myMenu also holds all logic.
// loading code in the main swf
var menuPos:Object = new Object();
menuPos.x = 0;
menuPos.y = 0;
var menu_mc:MovieClip = createEmptyMovieClip("menu_mc", 100);
with (menu_mc){_x = menuPos.x;_y = menuPos.y};
menuLoader.loadClip( menuMoviePath, menu_mc);
// the mouse listener in the menu swf
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
/*
* I guess I have to convert the coordinates
* of menu_holder with localToGlobal
* before doing the hitTest, but how ?
/*
var hitResult = myMenu.menu_holder.hitTest(_xmouse, _ymouse, false);
myMenu.menuControl(hitResult);
}
I really appreciate Your help, I am used to coding (PHP, Javascript), but OO gives me a hard time.
Thanks, Thomas
P.S. Your site is a great help for me.