Highlighted

How to remove default menu items in a Mac Air application

Community Beginner ,
Nov 06, 2014

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

TOPICS
Development

Views

635

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to remove default menu items in a Mac Air application

Community Beginner ,
Nov 06, 2014

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

TOPICS
Development

Views

636

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 06, 2014 0
Engaged ,
Nov 07, 2014

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2014 1
Community Beginner ,
Nov 10, 2014

Copy link to clipboard

Copied

Hi,

Thanks for the reply.

I will try this out.


Regards,

Jameel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 10, 2014 0
Community Beginner ,
Nov 10, 2014

Copy link to clipboard

Copied

Hurray!!!!

It worked. You made my day

Thanks a lot.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 10, 2014 0