• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to remove default menu items in a Mac Air application

Community Beginner ,
Nov 06, 2014 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

TOPICS
Development

Views

800

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
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 07, 2014 Nov 07, 2014

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

Votes

Translate

Translate
Guest
Nov 07, 2014 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

Votes

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
community guidelines
Community Beginner ,
Nov 10, 2014 Nov 10, 2014

Copy link to clipboard

Copied

Hi,

Thanks for the reply.

I will try this out.


Regards,

Jameel

Votes

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
community guidelines
Community Beginner ,
Nov 10, 2014 Nov 10, 2014

Copy link to clipboard

Copied

LATEST

Hurray!!!!

It worked. You made my day

Thanks a lot.

Votes

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
community guidelines