I'm basically trying to simulate the functionality of the Start Button for Windows. If you press a certain button, the menu pops up and then be able to use the arrow keys to navigate it. I've got all the key trapping fine, and the pop up piece, just can't put them together. Here's what i tried...
Code: Select all
var mn = getMenuByName("mainName");
popup("menuName");
for(x = 0; x < _mi.length; x++){
if(_mi[x][0] == mn){
itemOn(x);
break;
}
}
However, when i put the itemOn() call in there, the menu appears, but behind any other menu I have on the screen (like the z-index is not high enough) and the arrow keys do not do anything. W/o the itemOn() call, the menu pops up as expected.
If i open the menu with the mouse 'normally', the keypress module works correctly. Has anyone done this before and am I missing something?
Thanks