Adding native menus to an AIR application using ActionScript

Hi,
I'm working on Mac and PC with Air application.
I'd creates a class extends Menu witch goal is to create a nativeMenu.
My class is
package
    import flash.desktop.DockIcon;
    import flash.desktop.NativeApplication;
    import flash.desktop.SystemTrayIcon;
    import flash.display.BitmapData;
    import flash.display.Loader;
    import flash.display.NativeMenu;
    import flash.display.NativeMenuItem;
    import flash.display.NativeWindow;
    import flash.display.NativeWindowDisplayState;
    import flash.display.NativeWindowSystemChrome;
    import flash.display.Screen;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.events.NativeWindowDisplayStateEvent;
    import flash.geom.Rectangle;
    import flash.net.URLRequest;
    import flash.sampler.NewObjectSample;
    import mx.controls.Alert;
    import mx.controls.Menu;
    import mx.core.Application;
    import mx.core.FlexGlobals;
    import mx.core.WindowedApplication;
    import spark.components.Application;
    import spark.components.WindowedApplication;
    public class createMenuBar extends Menu
        public function createMenuBar()
         * Initializes the app after loading
        public function initWindow():void{
            // Create root menu
            var rootMenu:NativeMenu = new NativeMenu();
            // Create root submenus
            rootMenu.addSubmenu(creerMenuFichier(),"Fichier");
            rootMenu.addSubmenu(creerMenuEdition(),"Edition");
            // Attach event listener routine to root menu
            rootMenu.addEventListener(Event.SELECT, dispatchMenuCommand);
            // Assign application menu (Mac OS X)
            if(NativeApplication.supportsMenu){
                NativeApplication.nativeApplication.menu = rootMenu;
            // Assign window menu (MS Windows)
            if(NativeWindow.supportsMenu ){
                stage.nativeWindow.menu = rootMenu;
         * createMenuCommand()
         * Creates a menu command based on parameters
        public function createMenuCommand(menuContainer:NativeMenu,
            itemLabel: String, itemKey:String,itemModifiers:Array,
            itemMnemonic:int, selectHandler:Function):NativeMenuItem{
            var cmd:NativeMenuItem = NativeMenu(menuContainer).addItem(new NativeMenuItem(itemLabel));
            cmd.mnemonicIndex = itemMnemonic; // index de la lettre de rappel du raccourci par dŽfaut 0
            cmd.keyEquivalent = itemKey;
            if(itemModifiers !=null){
                cmd.keyEquivalentModifiers = itemModifiers;
            if (selectHandler !=null){
                cmd.addEventListener(Event.SELECT, selectHandler);
            return cmd;
         * createMenuSeparator()
         * Creates a menu separator
        private function createMenuSeparator(menuContainer:NativeMenu):NativeMenuItem{
            var sep : NativeMenuItem = NativeMenu(menuContainer).addItem(new NativeMenuItem("sep", true));
            return sep;
         * Creates the File menu for app
        private function creerMenuFichier(): NativeMenu{
            var mnu:NativeMenu = new NativeMenu();
            createMenuCommand(mnu, 'Changer Utilisateur','k',null, 0, hChangeUser);
            createMenuCommand(mnu, 'Verrouiller/DŽverrouiller','', null, 0, hLock);
            createMenuCommand(mnu, 'Maintenance','', null, 0, hMaintenance);
            createMenuSeparator(mnu);
            // If Mac OS X, then use Quit label
            if (NativeApplication.supportsMenu) {
                createMenuCommand( mnu, 'Quitter', 'q', null, 0, hExit); 
            // If Windows, then use Exit
            else {
                createMenuCommand( mnu, 'Fermer', 'x', null, 0, hExit);
            return mnu; 
        public function creerMenuEdition() : NativeMenu{
            var mnu:NativeMenu = new NativeMenu();
            createMenuCommand( mnu, 'Annuler', 'z', null, 0, null); 
            createMenuCommand( mnu, 'RŽpŽter', 'y', null, 0, null);
            createMenuSeparator(mnu);   
            createMenuCommand( mnu, 'Couper', 'x', null, 2, null); 
            createMenuCommand( mnu, 'Copier', 'c', null, 0, null); 
            createMenuCommand( mnu, 'Coller', 'v', null, 0, null); 
            return mnu;
         * Catch-all menu dispatcher for all menus
        public function dispatchMenuCommand(evt: Event):void {
            var menuItem:NativeMenuItem = evt.target as NativeMenuItem;
            if (!menuItem.hasEventListener('select')) { 
                Alert.show(menuItem.label + " a ŽtŽ selectionnŽ!");
         * Simple handlers for certain menu commands
        public function hChangeUser(evt: Event):void {
            Alert.show( "Vous allez changer d'utilisateur");
On main air app.mxml file I create menu with
var menu : createMenuBar = new createMenuBar();
  menu.initWindow();
application menu appear but when I work on Windows system, windows menu is not visible.
Can you help me to solve that?
Thanks

I believe you ran into an AIR limitation.  In the class header for NativeMenu it mentions:
A native menu is a menu that is controlled and drawn by the operating system rather than by your application.       AIR supports the following types of native menus:
Application menus are supported on OS X. Use the NativeApplication.supportsMenu property to test whether        application menus are supported on the host operating system. An  application menu is displayed on the Menu bar at the top of the        Mac desktop. OS X provides a default menu for every application, but  many of the menu commands are not functional. You can add       event listeners to the default items, replace individual menus and  items, or even replace the default menu entirely.       Access the application menu object using the NativeApplication menu property.
Window menus are supported on Windows and Linux. Use the NativeWindow.supportsMenu property to       test whether window menus are supported on the host operating system. A  window menu is displayed below the window title bar. The area       occupied by the menu is not part of the window stage. Applications  cannot draw into this area. Assign a menu to a window using the        NativeWindow menu property.
-ref: http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/display/Nati veMenu.html
Use the NativeMenu.isSupported property to check if OS supports it.  There is also NativeWindow.supportsMenu property that may help you.  I hope that helps.

Similar Messages

  • AIR application using actionscript

    How to create an AIR application using only actionscript(without mxml)?

    This is a forum for users of Adobe RoboHelp outputting to Adobe AIRHelp format. I think you need help from the Adobe AIR developers forum.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • Developing AIR application using actionscript only

    How to create an AIR application using only actionscript(without mxml)?

    There are many ways to do this. As long as you can compile the Actionscript code to a SWF file, you can then package it into an AIR file.
    If you ask how to do this in Flex Builder, at least in 4.0, when you create a desktop app. project. In the last dialog, there is a row says
    main application file, change the default file extension .mxml to .as, then FB automatically create the project with an actionscript package.
    Then you can start to code in actionscript without using Flex.
    Hope this answers your question.
    -ted

  • Silenting Installing AIR applications using Altiris

    I was wondering if anyone can provide some guidance or
    recommendations on how to silently install an AIR application using
    Altiris. We are not able to package the .air installer and proceed
    with the setup without prompting the user for the options screens.
    Any help or assistance that can be provided would be greatly
    appreciated.
    Thanks!

    If you have signed up for Adobe AIR Runtime Distribution Agreement, you should be able to use Silent Installation of AIR Runtime and App. We use that in our msi installer.
    Usage is:
    -silent {-eulaAccepted ( -location <loc> ) -desktopShortcut -programMenu} path_to_air_file
    Details of the options are included in the adobe_air_runtime_redistribution.pdf that you will get when you sign the agreement.
    -Jeesmon

  • FLV Playback and Seekbar on different native windows in one Air application

    Hello Everyone.  I'm trying to make a simple video playback AIR application that utilizes the initial native window to house a transport control with a seekbar on it.  Once the application launches, it creates a second (new) window on my second screen and places a FLVPlayback instance on that new window.  Everything works just like it want it to except for one thing.  When the seekbar and FLVplayback instance are not located on the same window stage, the seekbar handle sticks to the mouse when trying to scrub through the video.
    I've added both the transport control and the FLVPlayback instance to the original native window as children and I have also added both of them to the new window as children and everything works just fine.  It's only when they are separated and located on different stages that the seekbar acts up.  When they are on the same stage, I can click on a point on the seekbar and the video jumps to that spot and continues to play and I can also scrub the seekbar, the video updates as I scrub, and when I release the mouse, the seekbar handle stays where I released the mouse.  When they on separate stages, the seekbar handle continues to follow the mouse movement without releasing it.  The video updates as the seekbar handle is moved due to it sticking to the mouse, but if I release the mouse, the handle is still moving with the mouse and the video is still being scrubbed.  Like I said, everything works great except for this and I have reached my limit with time spent on this issue.  Does anyone have any insight into this?
    Here's my code for the project.  This is my first AIR application, so I am coding it as I am learning, please be kind.
    import fl.video.*;
    import flash.display.*;
    import flash.desktop.*;
    import flash.events.*;
    import fl.video.MetadataEvent;
    import flash.geom.*;
    import flash.ui.Mouse;
    import flash.text.*;
    GLOBAL SETUP
    var flvControl:FLVPlayback;
    var MasterWindow = stage.nativeWindow;
    var screen1:Screen = Screen.screens[0];
    var screen2:Screen = Screen.screens[1];
    MASTER WINDOW SETUP
    this.loaderInfo.addEventListener(Event.COMPLETE,maximize);
    transControl.playPauseButt2.addEventListener(MouseEvent.CLICK, PlayButton);
    if (Screen.screens.length > 1){
              createVideoBKG();
              createVideoPlayer();
    GENERAL FUNCTIONS
    //Maximize the initial screen
    function maximize(e:Event) {
              MasterWindow.x = screen1.bounds.left
              MasterWindow.maximize();
              MasterWindow.stage.scaleMode = StageScaleMode.EXACT_FIT;
    //Hide Mouse Behind Video Window On Roll-Over
    function MouseRollOver(e:MouseEvent):void
              {          Mouse.hide()          }
    function MouseRollOut(e:MouseEvent):void
              {          Mouse.show()          }
    //Play-Pause Button Control
    function PlayButton(event:MouseEvent):void
                        if(transControl.playPauseButt2.currentFrame==1 ){
                                  transControl.playPauseButt2.gotoAndPlay(2);
                                  flvControl.play();
                        else {
                                  transControl.playPauseButt2.gotoAndPlay(1);
                                  flvControl.pause();
    function CloseWindow(e:MouseEvent):void
                        NativeApplication.nativeApplication.openedWindows[2].close();
    VIDEO BKG SETUP
    function createVideoBKG(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoBKG:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoBKG.x = screen2.bounds.left;
              videoBKG.maximize();
              chromeSetup(videoBKG);
              videoBKG.activate();
    //Video BKG Chrome Setup
    function chromeSetup(currentWindow):void {
              var vidBKG = new video_bkg();
              vidBKG.name = "video_bkg2";
              vidBKG.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              vidBKG.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              currentWindow.stage.addChild(vidBKG);
    VIDEO Player SETUP
    function createVideoPlayer(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoPlayer:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoPlayer.x = screen2.bounds.left;
                        videoPlayer.y = screen2.bounds.top;
                        videoPlayer.width = screen2.bounds.width;
                        videoPlayer.height = screen2.bounds.height;
                        videoPlayer.stage.scaleMode = StageScaleMode.NO_SCALE;
              videoPlayer.alwaysInFront = true;
              var DVR = new DVR_Player();
              DVR.name = "DVR";
              DVR.x = 0;
              DVR.y = 0;
              DVR.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              DVR.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              videoPlayer.stage.addChild(DVR);
                flvControl = DVR.display2;
              flvControl.width = 1280;
              flvControl.height = 720;
              flvControl.skin = null;
              flvControl.autoPlay=false;   
              flvControl.isLive=false;
              flvControl.fullScreenTakeOver = false;
              flvControl.align = VideoAlign.CENTER;
              flvControl.scaleMode = VideoScaleMode.NO_SCALE;
              flvControl.source = "olympics.f4v";
              flvControl.seekBar = transControl.seekbarContainer2.seeker;
              videoPlayer.activate();

    Does anyone have any ideas about this?

  • Problem signing AIR application using migrate option

    I have a pkcs12 certificate (certificate.p12) which expired on 2014-09-16.
    Looking at Adobe AIR * Signing an updated version of an AIR application it should be in range of the 180 days/365 days after expiration, so it should be usable to sign for migration purposes.
    But using it like this:
    adt -migrate -storetype pkcs12 -keystore certificate.p12 test.air migrated_test.air
    Produces the following error:
    The signer's certificate chain contains a revoked certificate
    Questions:
    a) Does anybody have an idea what the problem could be or possible solutions?
    b) Is the error-message really caused by the expiration of the certificate, or would that error message be different, like for example: The signer's certificate chain contains an expired certificate?
    c) My thinking in b) is in regard to that the certificate was issued by TC TrustCenter GmbH which no longer issues certificates. Could this be the cause here?

    Okay, i just learned further infos. It really seems to be the case that the certification entries of TC TrustCenter GmbH were set to revoked state.
    Wahy was that done, should they be allowed to do this at this time?
    Can i still somehow do the migration?

  • Can worker created/packaged/executed into a Air application use Air features(like File?

    Hello,
    I have compiled "successfully" a Worker swf that uses some Air classes (like File, FileStream etc).
    Then i have embedded it into an AIR desktop application, but when i execute the application (with ADL or even installing and then executing it),
    i receive a Security Error from the worker, like if it's context doesn't support that type of operations. Is it correct?
    Can't workers use Air features like file write/access even if they are embedded in a Desktop Air Application?
    It means that can't workers open o write a file in every scenarios?
    Thank you
    Daniele

    Sorry. This is the answer:
    http://forums.adobe.com/message/4688380#4688380

  • How to Play/Pause All for Adobe Air Application using AS3 in Flash CS4?

    I am new to Flash and I'm creating an educational application in AS3 in Flash CS4 for Adobe Air. I want to use buttons to play and pause all content (movieclips AND sound).
    I have created play and pause buttons that worked by switching the frame rate between 0 and 20, unfortunately I've realised that it's never really 0fps but rather 0.01fps and so it continues playing, albeit very very slowly. Also this doesn't affect the audio; I have set sound files to Stream which are synced to movieclips on their timelines, but even when the application is set to 0fps the audio continues.
    Since I have various levels with numerous movieclips each with synced audio, what i'd like is to be able to do is pause absolutely everything within each movieclip with one button and to be able to resume from the same place using another button. Is this possible? If not, is there a global function to pause/resume the entire application/program?
    Thanks in advance for your help!

    Its possible but you would need to tell each movieclip and audioclip to play/pause. You can create a for loop inside your mouse event function to find each movieclip and pause/play its timeline and a separate for loop for audio clips. Also instead of setting fame rate to 0 for pause just use a stop() command.

  • How to display data from local csv files (in a folder on my desktop) in my flex air application using a datagrid?

    Hello, I am very new to flex and don't have a programming background. I am trying to create an air app with flex that looks at a folder on the users desktop where csv files will be dropped by the user. In the air app the user will be able to browse and look for a specific csv file in a list container, once selected the information from that file should be displayed in a datagrid bellow. Finally i will be using Alive PDF to create a pdf from the information in this datagrid laid out in an invoice format. Bellow is the source code for my app as a visual refference, it only has the containers with no working code. I have also attached a sample csv file so you can see what i am working with. Can this be done? How do i do this? Please help.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="794" height="666">
        <mx:Label x="280" y="19" text="1. Select Purchase Order"/>
        <mx:List y="45" width="232" horizontalCenter="0"></mx:List>
        <mx:Label x="158" y="242" text="2. Verify Information"/>
        <mx:DataGrid y="268" height="297" horizontalCenter="0" width="476">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
        <mx:Label x="355" y="606" text="3. Generated PDF"/>
        <mx:Button label="Click Here" horizontalCenter="0" verticalCenter="311"/>
    </mx:WindowedApplication>

    Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
    http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
    If this post answered your question or helped, please mark it as such.

  • What is Solution for error number 16822 in auto updating in AIR application using flash professional  cs6

    I follow the https://www.youtube.com/watch?v=CXKpw1HNoUA but its giving an error as
    There was an error downloading the update. Error# 16822

    manually download and update, Adobe - Adobe AIR

  • Packaging an AIR application in a native installer

    Hi! I'm trying to create a native installer of my AIR Application,  because (I think) it's the only way make the native processes working.  But I have a problem: I used the following command to pack: "adt  -package -storetype pkcs12 -keystore myCert.pfx -target native  -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp-app.xml", but I get  the error: "File myApp-app.xml is not a valid AIRI or AIR file". In the  Flash Builder I use as additional compiler arguments:  "-locale=pt_PT,en_UK,fr_FR,de_DE,ro_RO,es_ES  -allow-source-path-overlap=true -source-path=assets" and I add the  source path "src/locale/{locale}/". What is the sintax for packing my  AIR application in a native installer? Thanks in advance.

    Hi again! Thanks for the reply. I based myself on the link to see what command syntax I should use to pack my Air Windowed Application and it was the command that I presented in the previous post.
    adt version "2.0.1.12090"
                                                  My Descriptor File
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/2.0">
    <!-- Adobe AIR Application Descriptor File Template.
        Specifies parameters for identifying, installing, and launching AIR applications.
        xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0
                The last segment of the namespace specifies the version
                of the AIR runtime required for this application to run.
        minimumPatchLevel - The minimum patch level of the AIR runtime required to run
                the application. Optional.
    -->
        <!-- A universally unique application identifier. Must be unique across all AIR applications.
             Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
        <id>com.MyCompany.Application</id>
        <!-- Used as the filename for the application. Required. -->
        <filename>Production Control System</filename>
        <!-- The name that is displayed in the AIR application installer.
             May have multiple values for each language. See samples or xsd schema file. Optional. -->
        <name>Production Control System</name>
        <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
        <version>2.1.3</version>
        <!-- Description, displayed in the AIR application installer.
             May have multiple values for each language. See samples or xsd schema file. Optional. -->
        <!-- <description></description> -->
        <!-- Copyright information. Optional -->
        <!-- <copyright></copyright> -->
        <!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
        <!-- <publisherID>My Company</publisherID> -->
        <!-- Settings for the application's initial window. Required. -->
        <initialWindow>
            <!-- The main SWF or HTML file of the application. Required. -->
            <!-- Note: In Flash Builder, the SWF reference is set automatically. -->
            <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
            <!-- The title of the main window. Optional. -->
            <!-- <title></title> -->
            <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
            <systemChrome>none</systemChrome>
            <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
            <transparent>true</transparent>
            <!-- Whether the window is initially visible. Optional. Default false. -->
            <!-- <visible></visible> -->
            <!-- Whether the user can minimize the window. Optional. Default true. -->
            <!-- <minimizable></minimizable> -->
            <!-- Whether the user can maximize the window. Optional. Default true. -->
            <!-- <maximizable></maximizable> -->
            <!-- Whether the user can resize the window. Optional. Default true. -->
            <!-- <resizable></resizable> -->
            <!-- The window's initial width in pixels. Optional. -->
            <!-- <width></width> -->
            <!-- The window's initial height in pixels. Optional. -->
            <!-- <height></height> -->
            <!-- The window's initial x position. Optional. -->
            <!-- <x></x> -->
            <!-- The window's initial y position. Optional. -->
            <!-- <y></y> -->
            <!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
            <!-- <minSize></minSize> -->
            <!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
            <!-- <maxSize></maxSize> -->
        </initialWindow>
        <!-- We recommend omitting the supportedProfiles element, -->
        <!-- which in turn permits your application to be deployed to all -->
        <!-- devices supported by AIR. If you wish to restrict deployment -->
        <!-- (i.e., to only mobile devices) then add this element and list -->
        <!-- only the profiles which your application does support. -->
        <!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
        <supportedProfiles>extendedDesktop</supportedProfiles>
        <!-- The subpath of the standard default installation location to use. Optional. -->
        <!-- <installFolder></installFolder> -->
        <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
        <!-- <programMenuFolder></programMenuFolder> -->
        <!-- The icon the system uses for the application. For at least one resolution,
             specify the path to a PNG file included in the AIR package. Optional. -->
        <!-- <icon>
            <image16x16></image16x16>
            <image32x32></image32x32>
            <image48x48></image48x48>
            <image128x128></image128x128>
        </icon> -->
        <!-- Whether the application handles the update when a user double-clicks an update version
        of the AIR file (true), or the default AIR application installer handles the update (false).
        Optional. Default false. -->
        <customUpdateUI>true</customUpdateUI>
        <!-- Whether the application can be launched when the user clicks a link in a web browser.
        Optional. Default false. -->
        <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
        <!-- Listing of file types for which the application can register. Optional. -->
        <!-- <fileTypes> -->
            <!-- Defines one file type. Optional. -->
            <!-- <fileType> -->
                <!-- The name that the system displays for the registered file type. Required. -->
                <!-- <name></name> -->
                <!-- The extension to register. Required. -->
                <!-- <extension></extension> -->
                <!-- The description of the file type. Optional. -->
                <!-- <description></description> -->
                <!-- The MIME content type. -->
                <!-- <contentType></contentType> -->
                <!-- The icon to display for the file type. Optional. -->
                <!-- <icon>
                    <image16x16></image16x16>
                    <image32x32></image32x32>
                    <image48x48></image48x48>
                    <image128x128></image128x128>
                </icon> -->
            <!-- </fileType> -->
        <!-- </fileTypes> -->
        <!-- iPhone/iPad -specific capabilities -->
        <!-- <iPhone> -->
            <!-- A list of plist key/value pairs to be added to the application Info.plist -->
            <!-- <InfoAdditions>
                <![CDATA[
                    <key>UIDeviceFamily</key>
                    <array>
                        <string>1</string>
                        <string>2</string>
                    </array>
                    <key>UIStatusBarStyle</key>
                    <string>UIStatusBarStyleBlackOpaque</string>
                    <key>UIRequiresPersistentWiFi</key>
                    <string>YES</string>
                ]]>
            </InfoAdditions> -->
        <!-- </iPhone> -->
    </application>

  • Unable to send file in binary mode to ftp server using AIR application

    Hi,  Can any one help me. i am trying to send local files to ftp server  in binary mode from AIR application using sockets.
    I cant use PASV mode for this FTP server because security restrictions. when i am trying to send Binary command i am always getting
    error code 500 which is unrecognized command. I googled for solutions but i cant find any one using Binary mode to send data every example is using PASV mode to send
    file.
    code example:
    private function upload():void{
    sendCommand("binary ");
    private function sendCommand(arg:String):void {
                                            arg +="\n";
                                            s.writeUTFBytes(arg);
                                            s.flush();
    in response i am getting unrecognized command.

    I'm successfully using an ftp example from http://http://projects.maliboo.pl/FlexFTP/
    that I converted to spark and uses a popup progress window.
    If you don't need to use sockets I can post a sample project.
    I believe I still connect with PASV, but have no problems sending Binary files.
    I don't think they're commands that are dependent on each other

  • AIR Application stopping the MAC OS to Shutdown if event.preventDefault() is used

    Hi all,
    I have a issue that adobe air application is stoping the shutdown of the MAC,This issue arises only when
    AIR application uses event.preventDefault();
    Even I figureout the same thing when the TourDeFlex's AIR version was open on the MAC then also it is
    not allowing the shutdown to be allowed.Although the MAC gives the Alert message for the same and tell us
    to explicitly close the Application. So should this be treated as a bug or not?
    I have already checked the below mentioned link long ago in which it is told that this is not possible to find the solution for this.
    http://blogs.adobe.com/cantrell/archives/2011/07/when-air-applications-prevent-shutdown-or -restart-on-mac-os-x.html
    Still if anyone here is having any solution on this then any help will be appriciated.
    Also if it is not possible then also I will like that some one from Adobe AIR team to confirm me on this that this is not possible and this
    is know to you people.
    Thanks in advance
    Shardul

    Are the workarounds in the link you provided not sufficient?

  • Deployment of an Adobe AIR application in an enterprise environment

    Dear Team members,
    first of all my apologies for posting this thread in more than one forum (see Installations Issues) but the argument is very important to us and I don't know where discuss it.
    I would like to post a question to you regarding deployment doubts that we are trying to address.
    My company is working on the new version of our primary application previously built as a J2EE application with some reporting functions with Flex, and we want to use AIR in order to leverage its possibilities:
    Seamless integration with existing application functionalities (implemented as standard JEE web application pages) thanks to the integrated HTML capabilities
    Improved integration of the user interface with the desktop
    Native processes to provide additional functionalities
    Our application is targeted to pharmaceutical industry, subject to FDA regulations, and it affects more than 5000 users for each customer, so we have some specific requirements affecting the deployment and distribution of the software:
    Allow to run multiple versions of the software on the same client machine (to support test and acceptance activities in addition to the production environment)
    Minimize the effort of the initial setup on each client
    Manage the version upgrades without manual activities on each client
    Keep the test/acceptance and production environments strictly aligned to improve effectiveness of formal validation (ideally, an application once validated should be transported in production without any source code modification, recompilation or repackaging)
    The current browser-based strategy is perfectly fit to these requirements, and in the shift towards a desktop-based strategy we need to continue satisfying them as much as possible. We evaluated the standard distribution strategy of Adobe AIR applications, and noticed several attention points in this scenario.
    The first issue we encountered is the back-end services endpoint discovery problem. Simply hardcoding a server URL in the packaged application could be a viable solution for public internet-accessible applications, but we need to support multiple customers in their intranet, and each one typically requires multiple environments for the application (acceptance, production, etc.). Maintaining dozens of different packages of the AIR application to support all these customer environments clearly is not the solution. Neither we want to force thousands of different users to enter and maintain the correct server location in their local preferences.
    So, we thought to use a badge hosted in the back-end application to run the local AIR application: using the underlying API, we could activate the application specifying also the network location of the back-end services. We could also rely on the badge to install the application (and the AIR runtime if necessary)… however, application packaged as native installers cannot be installed, upgraded, or launched by the badge API (and we need to package ours as native to use native processes).
    We also noticed that multiple versions of an AIR application cannot be installed side-by-side in a client machine, and that the installation and upgrade of the application can be performed only when the local user has administrative rights on the machine (using standard or native packages), forcing us to rely on external software distribution systems in some customer scenarios (introducing additional complexities in the release cycle).
    At this point, in our opinion the standard deployment strategies of Adobe AIR applications are unfit for enterprise environments. In the enterprise world, many of the applications have migrated to a completely browser-based solution, while others enhanced their client layer to comply with the requirements, for example installing only a thin portion of the client code and allowing to connect to multiple server versions/environments with it (e.g. the SAP GUI universal client). Without smarter deployment and distribution tools, AIR applications currently are a step back compared to web applications in terms of manageability.
    So, we are trying to develop a solution to address these problems, with some concepts similar to JStart: install on the client machine a launcher application capable of being activated from a web page, dynamically locate, download and run the actual client bytecode, transparently enforce client software updates, and supporting multiple applications (and multiple versions of the same application). However, we are facing many technical problems due to internal architecture of AIR and we already spent a considerable amount of effort trying to find a solution. We are now thinking to return on the choice of AIR, going back to Flex.
    What is the position of Adobe on this argument? Is Adobe aware of these issues and are there any plans on this topic? Any advice?
    Thank you in advance

    For those following along, Oliver Goldman will be answering this post in future articles on his blog.
    Many great comments and questions here. I’m working on some follow-up posts to address these; nothing I could cram into this comment field would really do your query justice. - Oliver Goldman
    Pursuit of Simplicity
    Chris

  • AIR application with Flex 4.5 will not render content. What gives?

    OK,
    So I've upgraded to Flash Builder 4.5 Premium and I am unable to develop desktop AIR applications with the 4.5 Flex SDK. I start by simply creating a brand new AIR application using the default SDK (Flex 4.5). I set the title property on WindowedApplication and include a simple Label component. The project compiles fine but when I run the application all I see is the adl window in the dock but that's it. If I modify the Main-app.xml file to set the visible attribute to true, I will get a small window but there is no content although the output window shows the application swf being loaded. Checking the release version of the Main-app.xml file shows the correct path location to the swf.
    Here is what I've tried so far:
    Install/reinstall Flash Builder, 4+ times
    Downloaded the trial installation twice
    Downloaded the SDK's for 3.6, 4.1 and 4.5.0. I then copied each SDK folder and merged the AIR 2.6 SDK with each copy. So now I have 6 SDK versions; one pristine and the other with the AIR 2.6 SDK merged. I then added each SDK individually and created an AIR desktop application for each. Each and every one works fine with the exception of the two 4.5 SDK's. They will not render content.
    I created a simple creation complete handler for the application that declares a simple variable and assigns a value to it. I then put a break point on the assignment and it never gets caught. More evidence that the swf isn't getting loaded.
    The computer I'm running on is a Mac Book Pro with Snow Leopard 10.6.7. If I create a web project in each of the 6 SDK's, those will work just fine. What the heck is it with Flex 4.5 and the AIR 2.6 SDK on this machine? I have the AIR 2.6 runtime installed as well as a number of AIR applications that work just fine. I also tried my 4.5 test on my windows machine and that worked like a champ.
    I am completely out of ideas. Finding information has been difficult because everyone is all about mobile so searching for desktop issues is a losing battle. I realize this is a long email but I'm desperate for help. There must be someone out there that knows more about the low level interaction between Flex 4.5/AIR 2.6 and the OS.

    Well, I finally found the issue, a corrupted mm.cfg file in /Library/Application Support/Macromedia. I deleted the file and then adl ran just fine.

Maybe you are looking for

  • AP CREDIT MEMO

    HI, I'm working on credit memo conversion. I have a value in my data file for parent_invoice_id (which is the invoice id of the standard invoice which credit memo is matched).I'm not able to map this value to any of the interface table columns. So if

  • Playhead won't  show and songs repeat

    Playhead won't show and songs repeat. I've turned off phone and tried to tap artwork but it still doesn't show. I just get a place to select stars for the song and it continues to play the same song over

  • Thumbnails for .MOV in Vista Explorer?

    Anyway to display quicktime thumbs in explorer for Vista 64x?

  • Internet Explorer Versions

    Hi, I know this is not the place to be asking this kind of question, however I also know the people that look at the questions here are more likley to know the answer to this question. Does anyone know how install IE 5.5, IE 6 and IE7 all on the same

  • Can't open and (re)install Compressor, Qmaster & Qadministrator

    Okay, so have bought a mac with FCS3 a couple of weeks ago. I installed almost all of the Studio software without any problems, except for Compressor Qadministrator and Qmaster. I'm having a problem starting up these three programs. If I want to open