Alert.show on Air application

Dear Flexer,
I made an transparent Air application with no chrome.
With those configuration, I have a problem with alert window.
Indeed, if i try to use an alert.show anything appear on screen.
I thinks that this problem appear because on my application only menubar appear.
So as I work on Flex 4 with Macintosh system, I try to do Alert.show("Souhaitez-vous quitter MonAppli?", "Quitter     l'application", Alert.OK | Alert.
                CANCEL, Sprite(FlexGlobals.topLevelApplication);
But no alert on screen
Is anyone have a solution to solve that mistake?
Thanks for your help.

Post a 20-line test case.

Similar Messages

  • AIR applications - AIR license agreement showing instead of application

    Hi there
    I have a user who is experiencing the following issue - when he tries to run an AIR application, the license agreement shows (accept/decline), and then nothing (the app doesn't launch when you click accept).
    This happens for all his AIR applications (not just the one we developed), he's tried uninstalling and reinstalling both AIR and the app. He's using windows 7
    this is what shows when he launches an AIR App:

    I'm not a computer tech. I have to use AutoCAD for work. I listen to Pandora while i work. Pandora finally helped me. We removed the latest Adobe air update and installed an older one and that allowed Pandora app to show again. The only problem i have now is that i keep getting a notice from Adobe for an update. I don't trust Adobe anymore what a sorry company and now you are asking me to help solve its problems. I am so dissapointed. Also, you are just now getting around to contacting me. You guys need to do better it'll be awhile unfortunatley before i update or do anything with Adobe. The killer was that Adobe wanted me to pay 35 dollars for help. You suck!
    Date: Tue, 13 Dec 2011 17:36:20 -0700
    From: [email protected]
    To: [email protected]
    Subject: AIR applications - AIR license agreement showing instead of application
    Re: AIR applications - AIR license agreement showing instead of application created by chris.campbell in Installation Issues - View the full discussion
    Could you guys try running Microsoft's AccessEnum utility against your "C:\Users\UserName\AppData\Roaming\" folder and post the resulting log?  I suspect we're running into permission issues but this should give us a better idea.
    You might have to enable "show hidden files and folders" to be able to see the AppData folder.
    Thanks,
    Chris
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4083074#4083074
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4083074#4083074. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Installation Issues by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • [svn:osmf:] 13448: Adding WebPlayerDebugConsole: a tiny AIR application that shows the debugging information generated by WebPlayer instances .

    Revision: 13448
    Revision: 13448
    Author:   [email protected]
    Date:     2010-01-12 08:17:12 -0800 (Tue, 12 Jan 2010)
    Log Message:
    Adding WebPlayerDebugConsole: a tiny AIR application that shows the debugging information generated by WebPlayer instances.
    Added Paths:
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/.actionScriptProperties
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/.flexProperties
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/.project
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/src/
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/src/WebPlayerDebugConsole-app.xml
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/src/WebPlayerDebugConsole.mxml
        osmf/trunk/apps/samples/framework/WebPlayerDebugConsole/testCertificate.p12

  • Air application shows no GUI, any help?

    Hi all,
    I built and run an AIR application in  Flash Builder 4 IDE. The code works fine, the application runs and there is no error or warning. The GUI shows up okay and there is no any error when I  run "Export Release Build"  to create the myApp.air to make the application installable.
    With the myApp.air file, when I install this application, the installation goes okay but when I run the installed myApp application nothing shows up. I mean no GUI. If I check the task manager, the app seems running there as a process.
    This whole thing remained the same when I used FLEX Builder 3 as well as when I used command line build.
    Please help me resolve this problem.

    KGLAD, I appreciate your time and suggestions.
    I am sorry but I think I was not able to make my problem clear to you or may be didn't get you quite well.
    I have an application which runs fine when I build and run it in the IDE.  There is no error or warning at all.
    I can export this application to application.air without any error or warning.
    The main problem is - after I install the exported application.air app, nothing shows up. If I check in the task manager, the app seems running as a process.
    I can see all the required files loaded in the application.air package when I open it as a zip folder.
    Please tell me what things should I try to trace and when and where? Also share me some ideas on how to fix it.
    For your info:
    This app is AIR 1.0 app compiled with flex sdk 3.0 in Flex builder 3
    The problem remains same if I use flash builder 4 or do the command line compilation with adl and adt.
    I am using windows vista OS [Business Version].

  • How to open and show a word, excel, ppt file in Adobe AIR application?

    Dear All,
    I have a requirement to open a MS- word/ Excel file in the AIR application.
    On click of a brows button a file reference box opens...on any file
    selection...it should open in the application itself...
    so plz let me know the solutions u have...

    Here is your basic issue: setting a classpath (and presumably compiling and executing a program) is one of the most basic, fundamental concepts in Java. I would advise you to follow JVerd and Annie's links and get started on a tutorial. Try writing a simple HelloWorld application before delving into POI. When you are more comfortable writing and compiling programs, and post a specific question, it will be much easier to help you.
    - Saish

  • Why is my Air application taking so long to show the first view on iOS devices?

    I built an Air application that runs on Android devices and iOS devices. The application uses Air 3.4 and Flex SDK 4.6. On my Android device, the application starts in 5 seconds. On my iPad device, the application starts in 90 seconds.
    My application has a splash screen, which is launched via the ViewNavigatorApplication property, splashScreenImage.
    The application was built in release mode and the SWF file is 1.384M. After I create the ad-hoc build, which includes the Air Captive Runtime, I see the following file sizes and startup times.
    iPad 2 - ipa size, 8.6M
    12 seconds of black screen. Then my splash screen appears. 80+ seconds of splash screen. Then my first view appears.
    Android Nexus 7 - apk size, 4.0M
    2.5 seconds of black screen. Then my splash screen appears. 2.5 seconds of splash screen. Then my first view appears.
    Here are more details about my app.
    It's a video conferencing app. So I have to set renderMode to "cpu". The app has 5 views and several popups. The popups use the SkinnablePopupContainer. The app uses dependency injection as provided by the Parsley framework to share two small data objects between the views. The app uses web service calls to manage the conference state.
    The problem occurs at startup. I haven't rendered a view with video logic, and the first view is a welcome page with a scrollable text area for terms and conditions, one button with an icon, one toggle button, and one hyperlink button.
    The app has about 400k of embedded images which are rendered using the MultiDPIBitmapSource.
    The app has 43.3K of icons for the various sizes as specified in the application xml file.
    Any help would be greatly appreciated.

    I figured out how to resolve the issue. I had to change the renderMode from "cpu" to "direct". That solved the problem, and the application performs perfectly. Even the video displays work ok. It's interesting that Adobe advises against using "gpu" or "direct" renderMode when displaying video. I need to figure out why and make sure the application is acceptable as is.
    I have more testing to conduct, but I'm very encouraged.

  • How to Call a AIR application from Flex Application

    Hi,
        I have Used AIR (Desktop application) in Flex Builder to Upload a File from a local path and save it it a server path.
    I need to Call this AIR(Desktop application) from my Flex Application.... i.e
    I am using a link button to send a event using Script and Forward that Desktop application  from Flex Screen
    But it doesnot load that (Desktop application)  in Screen. Only Balnk screen is loaded from path
    Here is the code
    AIR(Desktop application)
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="openBrowseWindow();">
    <mx:HTTPService id="urlpath" showBusyCursor="true" useProxy="false" method="
    POST" url="http://localhost:8080/nat/FlexAction.do?method=UrlPath"result="pathresult(event)"
    fault="faultHandler(event)"
    >  
    </mx:HTTPService> 
    <mx:Script>
    <![CDATA[
    import mx.events.FileEvent; 
    import mx.rpc.events.ResultEvent; 
    import mx.rpc.events.FaultEvent; 
    import mx.utils.ObjectUtil;  
    import mx.controls.Alert;
    private  
    var openFile:File = new File() 
    private  
    function openBrowseWindow():void{openFile.addEventListener(Event.SELECT, onOpenFileComplete);
    openFile.addEventListener(Event.OPEN, load);
    openFile.browse();
    private  
    function load():void{Alert.show(
    "load"); 
    var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png"); 
    //var textTypes:FileFilter = new FileFilter("Text Files (*.txt, *.rtf)", "*.txt; *.rtf"); 
    var allTypes:Array = new Array(imageTypes);openFile.browse(allTypes);
    private  
    function faultHandler(event:FaultEvent):void { 
    //Alert.show("Fault")Alert.show(ObjectUtil.toString(event.fault));
     private  
    function pathresult(event:ResultEvent):void{Alert.show(
    "res") 
    //Alert.show(ObjectUtil.toString(event.result));}private  
    function onOpenFileComplete(event:Event):void{ 
    //mx.controls.Alert.show("event: "+event.target.nativePath +"UR!!!"); 
    var pPath = event.target.nativePath; 
    var parameters:Object = {FlexActionType:"PATH",path:pPath};  
    // Alert.show("Image Selected from Path : "+pPath); urlpath.send(parameters);
    //Alert.show("Passed.."+parameters);}
    ]]>
    </mx:Script>
    <mx:Button click="openBrowseWindow();onOpenFileComplete(event)" name="Upload" label="Upload" x="120.5" y="10"/> 
    Here is Mxml Code for Flex Application
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="http://ns.adobe.com/air/application/1.0.M4" >
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert; 
    private function Upload():void{ 
    // CursorManager.setBusyCursor();  
    //var url:String = "HomeAction.do?method=onLoad"; 
    //var url:String = "assets/Air.swf"; 
    var url1:URLRequest = new URLRequest("assets/Air.swf");navigateToURL(url1,
    "_self"); 
    // CursorManager.removeBusyCursor(); }
    ]]>
    </mx:Script>
    <mx:LinkButton id="up" click="Upload()" x="295" y="215" label="UpLoad"/>
    In this code i forward using s url to Open tat  Desktop application but a blank screen appears with out the proper output...
    Please Help me in this to forward AIR from Flex Screen..
    Thanks in Advance
    With Regards
    Gopinath.A
    Software Developer
    First Internet Systems Pvt. Ltd.,
    Chennai

    try this
    http://www.leonardofranca.com/index.php/2009/09/17/launching-an-installed-air-application- from-the-browser/
    regards
    Leonardo França
    Adobe Certified Expert Flex 3 with AIR
    Adobe Certified Expert Rich Internet Application Specialist v1.0
    Adobe Certified Expert Flash CS3 Professional
    Certified Professional Adobe Flex 2 Developer
    Adobe Certified Professional Flash MX 2004 Developer
    http://www.leonardofranca.com
    http://twitter/leofederal
    Manager AUGDF - Adobe User Group do Distrito Federal
    http://www.augdf.com.br
    http://twitter/augdf

  • How to play and stop flv files through NetStream in AIR Application

    Hi,
    In a folder I have 'n' number of flv file, which are DRM protected. when the user try to play those files for the first time through my AIR application, it will prompt for username and password and gets the license/voucher from the server and store it in AIR Runtime. so that from the next time onwords it won't prompt for username and password as because it already has license/voucher.
         My problem is assume there are 500 files, such that for each file the user has to enter his credentials[username and password]. which is a stupid thing. I want to avoid this process by implementing this process internally/programetically. By playing/accessing each file through netstream from the folder and setDRMAuthenticationCredentials for that file and stop the stream. Here I am able to play each file but I am failed to stop it. I mean to say I will get the license for all the flv files internally[while loading my AIR application], such that user should not be interrupted for his credentials for each file.He should play as if he is accessing/playing a non-DRM protected file. I will be very thank full if any one help me out in this.
    public function init():void {
          connectStream();
          getLicenseForAllFiles();
          videoStream.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, drmAuthenticateEventHandler);
          ppt_videoStream.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, ppt_drmAuthenticateEventHandler);
            private function getFilesRecursive(rootFolderPath:String):void {
                //the current folder object
                var currentFolder:File = new File(rootFolderPath);
                //the current folder's file listing
                var files:Array = currentFolder.getDirectoryListing();
                //iterate and put files in the result and process the sub folders recursively
                for (var f = 0; f < files.length; f++) {
                    if (files[f].isDirectory) {
                        if (files[f].name !="." && files[f].name !="..") {
                            //it's a directory
                            getFilesRecursive(files[f].nativePath);
                    } else {
                        //it's a file
                        fileList.push(files[f].nativePath);
                        //Alert.show(""+files[0].nativePath);
                        var fileName:String = files[f].name;
                        if(fileName.indexOf("PPT_")!=-1){
                            ppt_videoStream.play(files[f].nativePath);
                            ppt_videoStream.pause();
                        videoStream.play(files[f].nativePath);
                        videoStream.pause();
                private function connectStream():void {
                    videoConnection = new NetConnection();
                    videoConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    videoConnection.connect(null);
                    ppt_videoConnection = new NetConnection();
                    ppt_videoConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ppt_videoConnection.connect(null);
                    videoStream = new NetStream(videoConnection);
                    videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    video.attachNetStream(videoStream);
                    ppt_videoStream = new NetStream(ppt_videoConnection);
                    ppt_videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ppt_video.attachNetStream(ppt_videoStream);
             private function netStatusHandler(event:NetStatusEvent):void {
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        //connectStream();
                        break;
                    case "NetStream.Play.StreamNotFound":
                        trace("Unable to locate video: " + videoURL);
                        break;
                private function drmAuthenticateEventHandler(event:DRMAuthenticateEvent):void {
                    videoStream.setDRMAuthenticationCredentials("adobe", "adobe", "drm");
                private function ppt_drmAuthenticateEventHandler(event:DRMAuthenticateEvent):void {
                    ppt_videoStream.setDRMAuthenticationCredentials("adobe", "adobe", "drm");
    Thanks
    Sudheer Puppala

    Hi,
    Please go through following links..this will help you:
    http://lucamezzalira.com/2009/02/28/create-pdf-in-runtime-with-actionscript-3-alivepdf-zin c-or-air-flex-or-flash/
    http://forums.adobe.com/thread/753959
    http://blog.unthinkmedia.com/2008/09/05/exporting-pdfs-in-flex-using-alivepdf/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • AIR application crashes at certain point in windows vista

    Hi Dudes,
    I am facing a problem in Window vista. It always crash when we open the window component using Adobe AIR. I am creating the Dynamic window and adding the child component as window.rawChildren.addChild(object) like this.. we made the setup , it is running perfect in all OS except Windows vista 32/64 bit.
    When we work with our AIR application in conjunction with our own h/w product(Tablet Driver).[without connection of Tablet slate with PC it works fine but with it not].
    S/w Details:- AIR Installer above 2 and SDK above 2.
    OS- Win-Vista 32/64 bit.
    AIR application crashes at certain point and shows the error like:-
    Problem signature:
      Problem Event Name:                        APPCRASH
      Application Name:                             GTMP.exe
      Application Version:                           0.0.0.0
      Application Timestamp:                     4bde2f02
      Fault Module Name:                          Adobe AIR.dll
      Fault Module Version:                        3.1.0.4880
      Fault Module Timestamp:                  4eb760e8
      Exception Code:                                  c0000005
      Exception Offset:                                003ca9be
      OS Version:                                          6.1.7601.2.1.0.768.3
      Locale ID:                                             2057
      Additional Information 1:                  0a9e
      Additional Information 2:                  0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:                  0a9e
      Additional Information 4:                  0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    I found one more error in debugging mode..the Alert message is
    Microsoft Visual C++ Runtime Library
    R6025 -
    pure virtual function Call.
    As per my view it is about some .dll and .CPL file makes some issues with AIR Frameworks is it? !!!!..
    Please give some ideas to resolve it.
    by
    Beerahamedkhan

    Could you try this against the released 3.2 version of AIR and our 3.3 beta to see if it still occurs?  If so, please open a new bug report on this over at bugbase.adobe.com?  Include any sample code or application to help us easily reproduce the problem.  If you'd like to keep your code private, please feel free to send it to me directly at [email protected]  In addition, if you can give us a .dmp of this crash it could be very helpful. 
    Please post back with the URL so that others affected can add their comments and votes.

  • Problem in full screen mode air application

    Hi All
    I am facing some problem in creating an air application. I used fullscreenmode .FULL_SCREEN_INTERACTIVE to maximize the window on load the application was succeeded in some extent. But there is one problem one bottom bar is coming just under the window. can anybody please help me. I am attaching the preview with this.
    Thanks and regards

    Hi M*A*S*H 4077 thanks agan for your reply sending you the total code i used in my project.As I am a new coder my codes are not in abc please try to understand.please have a look and if u want to see my componentcode then also i can send code.component i only used in the video part.
    thank you
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:components="components.*"
        verticalAlign="top"
        backgroundColor="white"
        borderStyle="none"
        borderThickness="0"
        creationComplete="init();"
        baseline="0"
        paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"      
        initialize="service.send()"               
        applicationComplete="fullscreenmode()"
        backgroundGradientAlphas="[1.0, 1.0]"
        backgroundGradientColors="[#CCCCCC, #090909]"
        backgroundImage="@Embed(source='assets/background/background.jpg')"
        >
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import flash.display.Sprite;
                import flash.display.StageAlign;
                import flash.display.StageScaleMode;
                import mx.rpc.events.ResultEvent;
                import mx.effects.Iris;
                import mx.effects.easing.*;
                import flash.utils.Timer;
                [Bindable]
                public var secondsTillDue:int=100;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
                public var bol:Boolean;
                [Bindable]
                private var images:ArrayCollection;
                [Bindable]
                private var centerpoint:Number;
                [Bindable]
                private var currentIndex : Number = 0;
                public var myTimer:Timer;
                [Bindable]
                private var mainwidth:Number;
                [Bindable]
                private var mainheight:Number;
       private function init():void {
                myTimer=new Timer(1000);
                myTimer.addEventListener(TimerEvent.TIMER,warnIfClose);
                myTimer.start();
                // Initialize the uldr variable which will be used to load the external
                // playlist XML file.
                uldr = new URLLoader();
                uldr.addEventListener(Event.COMPLETE, xmlCompleteHandler);
                uldr.load(new URLRequest(PLAYLIST_XML_URL));
            /* function setFullScreenDisplayState():void{
                 stage.displayState=stageDisplayState.FULL_SCREEN_INTERACTIVE;
          public function warnIfClose(event:TimerEvent):void{
            secondsTillDue=secondsTillDue-1;
            if(secondsTillDue==90){   
             lab1.setStyle("hideEffect", fade);
             lab1.visible=false;
             clockpan.visible=false;
             clockpan.includeInLayout=false        
             clock1.setStyle("hideEffect", fade);
             clock1.visible=false;        
            else if(secondsTillDue==88){
                mainbox
                imagePart.setStyle("showEffect",fade);
                imagePart.visible=true;
                imagePart.includeInLayout=false;
             else if(secondsTillDue==83){
                 imagePart.visible=false;            
                 imagePart.setStyle("hideEffect",fade)        
                 videoContainer.visible=true;
                 playVideo();    
                private function fullscreenmode():void{
                stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
                mainwidth=stage.width;
                mainheight=stage.height;
                centerpoint=stage.height/2;
                private function serviceHandler(event:ResultEvent):void{           
                    images = event.result.gallery.img;
                    var timer:Timer = new Timer(15000);
                    timer.addEventListener(TimerEvent.TIMER,nextImage);
                    timer.start();
                private function nextImage(event:TimerEvent):void{
                        if (currentIndex < images.length - 1){
                            currentIndex++;
                        else {
                            currentIndex = 0;
            import mx.controls.ProgressBarMode;
                 * The amount of time between calls to update the playhead timer, in
                 * milliseconds.
                private const PLAYHEAD_UPDATE_INTERVAL_MS:uint = 10;
                 * The path to the XML file containing the video playlist.
                private const PLAYLIST_XML_URL:String = "playlist.xml";
                 * The client object to use for the NetStream object.
                private var client:Object;
                 * The index of the currently playing video.
                [Bindable]
                private var idx:uint = 0;
                 * A copy of the current video's metadata object.
                private var meta:Object;
                private var nc:NetConnection;
                private var ns:NetStream;
                private var playlist:XML;
                private var t:Timer;
                private var uldr:URLLoader;
                private var vid:Video;
                private var videosXML:XMLList;
                 * The SoundTransform object used to set the volume for the NetStream.
                private var volumeTransform:SoundTransform;
                 * Constructor
                private function initApp():void {
                    // Initialize the uldr variable which will be used to load the external
                    // playlist XML file.
                    uldr = new URLLoader();
                    uldr.addEventListener(Event.COMPLETE, xmlCompleteHandler);
                    uldr.load(new URLRequest(PLAYLIST_XML_URL));
                 * Once the XML file has loaded, parse the file contents into an XML object,
                 * and create an XMList for the video nodes in the XML.
                private function xmlCompleteHandler(event:Event):void {
                    playlist = XML(event.target.data);
                    videosXML = playlist.video;
                    main();
                 * The main application.
                private function main():void {
                    volumeTransform = new SoundTransform();
                    // Create the client object for the NetStream, and set up a callback
                    // handler for the onMetaData event.
                    client = new Object();
                    client.onMetaData = metadataHandler;
                    nc = new NetConnection();
                    nc.connect(null);
                    // Initialize the NetSteam object, add a listener for the netStatus
                    // event, and set the client for the NetStream.
                    ns = new NetStream(nc);
                    ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ns.client = client;
                    // Initialize the Video object, attach the NetStram, and add the Video
                    // object to the display list.
                    vid = new Video();
                    vid.x = 0;
                    vid.y = 0;
                    vid.attachNetStream(ns);
                    videoContainer.addChild(vid);
                    // Begin playback of the first video.
                    //playVideo();
                     //play video code goes here
                    // Initialize the Timer object and set the delay to
                    // PLAYHEAD_UPDATE_INTERVAL_MS milliseconds.
                    t = new Timer(PLAYHEAD_UPDATE_INTERVAL_MS);
                    t.addEventListener(TimerEvent.TIMER, timerHandler);
                    // Configure the positionBar ProgressBar instance and set the mode to
                    // MANUAL. Progress  bar values will be explicitly set using the
                    // setProgress() method.
                    //positionBar.mode = ProgressBarMode.MANUAL;
                    // Configure the volumeSlider Slider component instance. The maximum
                    // value is set to 1 because the volume in the SoundTransform object
                    // is set to a number between 0 and 1. The snapInterval and tickInterval
                    // properties are set to 0.1 which allows users to set the volume to
                    // 0, 0.1 - 0.9, 1.0 which allows users to increment or decrement the
                    // volume by 10%.
                    //volumeSlider.value = volumeTransform.volume;
                    //volumeSlider.minimum = 0;
                    //volumeSlider.maximum = 1;
                    //volumeSlider.snapInterval = 0.1;
                    //volumeSlider.tickInterval = volumeSlider.snapInterval;
                    // Setting the liveDragging property to true causes the Slider
                    // instance's change event to be dispatched whenever the slider is
                    // moved, rather than when the user releases the slider thumb.
                    //volumeSlider.liveDragging = true;
                    //volumeSlider.addEventListener(Event.CHANGE, volumeChangeHandler);
                    // Configure the various Button instances. Each Button instance uses
                    // the same click handler.
                    //playButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //pauseButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //stopButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //backButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //forwardButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                 * Event listener for the volumeSlider instance. Called when the user
                 * changes the value of the volume slider.
                private function volumeChangeHandler():void {
                    // Set the volumeTransform's volume property to the current value of the
                    // Slider and set the NetStream object's soundTransform property.
                    //volumeTransform.volume = volumeSlider.value;
                    ns.soundTransform = volumeTransform;
                 * Event listener for the ns object. Called when the net stream's status
                 * changes.
                private function netStatusHandler(event:NetStatusEvent):void {
                    try {
                        switch (event.info.code) {
                            case "NetStream.Play.Start" :
                                // If the current code is Start, start the timer object.
                                t.start();
                                break;
                            case "NetStream.Play.StreamNotFound" :
                            case "NetStream.Play.Stop" :
                                // If the current code is Stop or StreamNotFound, stop
                                // the timer object and play the next video in the playlist.
                                t.stop();
                                playNextVideo();
                                break;
                    } catch (error:TypeError) {
                        // Ignore any errors.
                 * Event listener for the ns object's client property. This method is called
                 * when the net stream object receives metadata information for a video.
                private function metadataHandler(metadataObj:Object):void {
                    // Store the metadata information in the meta object.
                    meta = metadataObj;
                    // Resize the Video instance on the display list with the video's width
                    // and height from the metadata object.
                    vid.width = mainwidth;
                    vid.height = mainheight;
                    // Reposition and resize the positionBar progress bar based on the
                    // current video's dimensions.
                    //positionBar.move(vid.x, vid.y + vid.height);
                    //positionBar.width = vid.width;
                 * Retrieve the current video from the playlist XML object.
                private function getVideo():String {
                    return videosXML[idx].@url;
                 * Play the currently selected video.
                private function playVideo():void {
                    var url:String = getVideo();
                    ns.play(url);
                 * Decrease the current video index and begin playback of the video.
                private function playPreviousVideo():void {
                    if (idx > 0) {
                        idx--;
                        playVideo();
                        // Make sure the positionBar progress bar is visible.
                        //positionBar.visible = true;
                 * Increase the current video index and begin playback of the video.
                 [Bindable]
                 private var newTime:Number;
                private function playNextVideo():void{
                    if (idx < (videosXML.length() - 1)) {
                        // If this is not the last video in the playlist increase the
                        // video index and play the next video.
                        idx++;
                        playVideo();
                        // Make sure the positionBar progress bar is visible.
                        //positionBar.visible = true;
                    } else {
                        // If this is the last video in the playlist increase the video
                        // index, clear the contents of the Video object and hide the
                        // positionBar progress bar. The video index is increased so that
                        // when the video ends, clicking the backButton will play the
                        // correct video.
                        idx++;
                        vid.clear();
                        init();
                        //Alert.show("video end")
                        //positionBar.visible = false;
                private function timerHandler(event:TimerEvent):void {
                    try {
                    } catch (error:Error) {
            ]]>
        </mx:Script>
    <mx:XML id="imagesXML" source="data/images.xml" />
        <mx:Zoom id="zoom" />
        <mx:Fade id="fadein" duration="1000" alphaFrom="100" alphaTo="0" />
        <mx:Fade id="fade" />
        <mx:Rotate id="rotate"
                angleFrom="-180"
                angleTo="0"
                easingFunction="Elastic.easeInOut"
                duration="2000" />
    <mx:VBox  id="mainbox" horizontalAlign="left" width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                <mx:Panel borderStyle="none"
               borderAlpha="0"
               cornerRadius= "0"
               headerHeight= "0"
               backgroundAlpha= "0"
               borderThickness="0"
               verticalAlign="middle"
               top="100"
               height="500"
               paddingLeft="0"
               paddingRight="0"
               paddingBottom="0"
               verticalScrollPolicy="off"
               horizontalScrollPolicy="off"
               horizontalAlign="center"          
               width="{mainwidth-100}"           
               id="clockpan"
               >       
                    <mx:Label text="Current Time : " fontFamily="arial" fontWeight="bold" fontSize="15" id="lab1" color="#FFFFFF"/>
                    <components:MyWatch formatString="DD/MM/YYYY KK:NN:SS " themeColor="#0D424C" id="clock1"/>
                </mx:Panel> 
        <!--image part start-->     
        <mx:Panel horizontalAlign="left" id="imagePart" visible="false" includeInLayout="false" borderStyle="none"
               borderAlpha="0"
               cornerRadius= "0"
               headerHeight= "0"
               borderThickness="0"
               verticalScrollPolicy="off"
               paddingLeft="0" paddingBottom="0" paddingRight="0" paddingTop="0"
               horizontalScrollPolicy="off"
               backgroundAlpha= "0" width="100%" height="100%">       
                <mx:Image source="assets/images/{images.getItemAt(currentIndex).file}"
                    showBusyCursor="true" id="imagefile" width="{mainwidth}" maxHeight="{mainheight}" minHeight="{mainheight}" maxWidth="{mainwidth}" minWidth="{mainwidth}" height="{mainheight}" hideEffect="{fadein}"  x="0" y="0" maintainAspectRatio="false"/>
                <mx:Text text="{images.getItemAt(currentIndex).title}" styleName="title" color="#ffffff" x="0" y="30"/>
         </mx:Panel>
        <!--image part end-->
        <!--image part start-->      
        <mx:Panel borderStyle="none"
               borderAlpha="0"
               cornerRadius= "0"
               borderThickness="0"
               headerHeight= "0" top="0" left="0"
               backgroundAlpha= "0" verticalAlign="middle"
               verticalScrollPolicy="off"
               horizontalScrollPolicy="off"
               x="0"
               >
             <mx:VideoDisplay borderStyle="none" borderThickness="0" visible="false" id="videoContainer"
                  maintainAspectRatio="false"           
                  />
        </mx:Panel>
        <!--image part end-->
         <!--<mx:Button label="fullscreen" click="stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;"/>-->
         </mx:VBox>   
        <mx:HTTPService id="service" url="data.xml" result="serviceHandler(event)"/>
    </mx:WindowedApplication>

  • 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.

  • Cannot install AIR application when the system date is set beyond 10/31/2017

    I created a native time-stamped installer for an AIR application. While testing the installer with different system dates, I noticed that the installer does not work when the system date is set beyond 10/31/2017. I tested the same with a self-signed certificate as well as a Verisign certificate and found the behaviour to be consistent. Why does the installer stop working after this date?

    Thanks very much for keeping this issue alive.
    Let me restate the issue:
    We have a AIR 2.0.4.13090 sidecar application. Installing the application for the very first time seems to work. Any uninstall or update after that runs into issues on the problematic Windows 7 64 bit machine. The installer logs all point the finger to Windows Installer having problems writing to the temp directory.
    We've gone through many, many things trying to resolve this, including resetting administrative access to the temp directory and flushing the temp directory out entirely. I'm reporting this news secondhand, so it's not possible for me to directly relate the exact measures taken, step-by-step. The ONLY thing that reliably worked for running and installing updates on this AIR application was the following:
    1) Create a new administrative level user.
    2) Log in with that user.
    3) Disable firewalls.
    4) Run the updater.
    5) Log back in as normal user, delete temporary user.
    if the user account created in step 1 is not deleted in step 5 and is used to attempt a further update or uninstall, it will fail. This seems to tell me that AIR is able to utilize the temp folder via Windows Installer correctly only once. After that, it dirties this directory somehow and is unable to use/write to it, and subsequent uninstalls/updates fail with error 0.
    Again, the failure all show msi issues writing to the temp directory. They result in an "Error 0" alert dialog in AIR.

  • Alert.Show WEIRDNESS

    OK, riddle me this, Batman:
    I've got a function (example attached) with a number of items
    running in it (alot of setting of variables, and outputting them to
    text areas and such). When I have an Alert.show call, all is well
    and the variables get set and output just fine.
    But when I remove or comment out the Alert.show call, the
    whole thing comes to a grinding halt and variables are not set.
    And here's the weird part (like the stuff above wasn't weird
    enough): the Alert.show can't be a hard-coded string, it has to be
    the value that one of the variables is being set to (in other
    words, the original value that was saved as a variable, not he
    variable itself).
    I've hit this now both in Flex 3 and Flex 3 AIR
    applications...
    HELP! (and thanks)

    I was having trouble with Alert.show and thought it was a
    problem with the function, too. But it was something I was doing.
    You don't say how myGameText is declared, but it seems pretty
    obvious. You might want to try enclosing variables in String() when
    you are passing them to functions that require strings. Like
    gmDate.text=String(myGame.@date);

  • AIR Application freezes on startup

    I've been working on a AIR project for some time and tried to
    incorpoate some gestures and multitouch events into the project. When I tried to run the project, it
    froze. So I created a new project that just has a simple textInput component and references a
    TouchEvent, and it worked. I then copied my project to another location, stripped everything out of it, and
    copy-and-pasted the working code into the shell that I created. Same problem. The application froze.
    I verified that the properties were the same between the two projects, but still no success. The code
    for the little test project is
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
         creationComplete="initializeApp()"
         click="onClick(event)"
         width="100%" height="100%"  backgroundColor="#D5D2D2"
      title="Test Flash"
      >
      <fx:Script>
       <![CDATA[
        import mx.controls.Alert;
        import flash.ui.Multitouch;
        public function initializeApp() : void
         maximize();
        public function onTouchTap(event : TouchEvent) : void {
         Alert.show("onTouchTap method","test");
        public function onClick(event : MouseEvent) : void {
         Alert.show("onClick method","test");    
       ]]>
      </fx:Script>
      <mx:TextInput id="upcTextInput" fontSize="14" x="10" y="10"
           visible="true" 
           click="onClick(event)"
           height="36" width="100" borderStyle="solid" />
    </s:WindowedApplication>
    If the method onTouchTap (which is not referenced any place) is removed, both projects run.
    Any clue as to what is going on?
    ci-bro

    Just as an update, I had my friend try the same jarfile on his Mac Mini running 10.5.6 and it worked no problem. So it must be something to do with my setup. I am extremely unfamiliar with Java and programming so any technical talk needs to be in layman's terms. Thanks again.

  • Right way to code an AIR application that uses sqllite database

    I am developing an AIR application that uses sqllite database.I want to know the correct way in which I should create the connections and SQLstatements according to MVC pattern.For example,whether i should have a single SQLStatement object for all my sql operations or I should use separate objects for insert,delete,select etc.I know how to open connection,execute statements and all,but i want to know the professional way of writing it.

    Make a controller for connect to db and save the connection in global varible (in model). Use this connection variable whenever u wanna execute the sql statements. Create seperate dao's for each table. Queries should be executed under the daos. You can call the method under the dao for execute the query from controller and show the result in view.

Maybe you are looking for

  • Adding Sales Office to FBL5N selection screen

    Hi, I need to add Sales Office to FBL5N. Now the DDF logical data base doesn't have the table KNVV. So is there any other option to add this field to FBL5N selection screen. Along with this I need to add custom columns as well to the report outcome,

  • Adding a new device profile, a camera,  to ColorSync

    I recently purchased a Canon 40D digital SLR. It allows you to select the color space you want assigned to your image files -- I selected RGB. When you open the ColorSync utility there's a tab for devices and a list that includes 'camera'. How to I a

  • Issue with DSO Table for New data

    When I click on content of new data in the manage of this particular DSO it hangs forever. Also, when I go to se11 and give the related New Data table, it ahngs forever. Anybody experienced this before or what would this issue be related to? Thanks i

  • Why cant i edit an album in the get info screen

    it doesnt let me click on anything other than next and okay and cancel. this is what it looks like ill even try to edit the info by using windows explorer but nothing works please if anyone can help me i would greatly appreciate it

  • I can't open iMovie 10.0.3. please help!

    I cant open imovie 10.0.3 after the update. Please help!!