Copy link to clipboard
Copied
Hi Everybody,
I have a Air application built in Flash Builder which runs on Windows as well as in Mac.
My application has it's own menu bar. In windows it's OK.
But in Mac above my app's menu bar there is a default Mac app menu bar with four items(App Name, File, Edit, Windows), which is totally unnecessary.
I want to remove the Mac's default app menu bar.
Please help.
Thanks in advance,
Jameel
You can remove them using the NativeApplication.nativeApplication.menu property to access the native menu.
import flash.desktop.NativeApplication;
if (NativeApplication.nativeApplication.supportsMenu) {
NativeApplication.nativeApplication.menu.removeAllItems();
}
The ASDocs says this removes all menu items, but I imagine it will leave the "App Name" menu item on Mac OS computers so the user will know what app is currently active and so it can be closed or hidden.
NativeMenu - Adobe ActionScript® 3 (AS3 ) API Reference
NativeApplication - Adobe ActionScript® 3 (AS3 ) API Reference
Copy link to clipboard
Copied
You can remove them using the NativeApplication.nativeApplication.menu property to access the native menu.
import flash.desktop.NativeApplication;
if (NativeApplication.nativeApplication.supportsMenu) {
NativeApplication.nativeApplication.menu.removeAllItems();
}
The ASDocs says this removes all menu items, but I imagine it will leave the "App Name" menu item on Mac OS computers so the user will know what app is currently active and so it can be closed or hidden.
NativeMenu - Adobe ActionScript® 3 (AS3 ) API Reference
NativeApplication - Adobe ActionScript® 3 (AS3 ) API Reference
Copy link to clipboard
Copied
Hi,
Thanks for the reply.
I will try this out.
Regards,
Jameel
Copy link to clipboard
Copied
Hurray!!!!
It worked. You made my day
Thanks a lot.