Exit Android App with external *actionscript.as* files

Hi, i'm trying to make this code work with a application that got 99% of code driving by external actionscript.as files;
In another app without any external call i mean no actionscript.as files, the code work very fine.
My goal is to shutdown any activity of the app when the user receive a call or something like that;
Many thanks in advance and sorry my english
Scene 1, Layer 'Layer 1', Frame 1, Line 14
1046: Type was not found or was not a compile-time constant: KeyboardEvent.
function handleActivate(event:Event):void
    NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
function handleDeactivate(event:Event):void
    NativeApplication.nativeApplication.exit();
function handleKeys(event:KeyboardEvent):void        ----- Line 14 -----
    if (event.keyCode == Keyboard.BACK)
        NativeApplication.nativeApplication.exit();
if (Capabilities.cpuArchitecture == "ARM")
    NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate, false, 0, true);
    NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
    NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys, false, 0, true);

Look Mr. Colin, added the import flash.events.KeyboardEvent; and thats what i got:
Scene 1, Layer 'Layer 1', Frame 1,
Access of undefined property:
NativeApplication
SystemIdleMode
Keyboard
Capabilities
I'm addind this code inside Flash CS6, not via external.as

Similar Messages

  • Deployment of enterprise app with external resources (binary file)

    Hi. Where do I configure/add external resources (such as a text or binary file) in an enterprise app so that they will also be deployed to a WebSphere Express server? Should they be added to the enterprise app at all, or should they simply be moved up to a server directory? (I am trying to avoid a hardcoded file path in my servlet.)
    I could use a properties file, but I was wondering if there is something in one of the deployment descriptor settings that would help me out?
    I need one of my servlets to stream in this external binary file after the enterprise app has been deployed to a WebSphere Express server.
    Thank you.

    Normally, the context of the bin directory or the WASHOME will be the startup directory for the server. If you use File IO without a path it will pick it up from this directory. so u can place the file in this directory so that ur Servlet can stream the file.

  • How to add admob in android app with dreamweaver

    how to add admob in android app with dreamweaver ?

    flash-air-admob-ane-for-ios-and-android - Admob Ane,a adobe native extention(ANE) for actionscript developer to add go…
    code and demo.but you need upgrade to flash cc.

  • How to publish android app with the new AIR 2.6 ?

    Please anyone can help to instruct the correct way to install the new AIR SDK?
    I work with Flash IDE and don't know how to link them...
    And another noob question, are there any differences between "AIR Android" and "Adobe AIR 2" in publish settings when I'm going to create an android app with up-to-date AIR version? I was very confused by the scenario that as long as I upgraded to AIR2.6 SDK, "AIR Android" remains 2.5 though "Adobe AIR2" will surely be 2.6?
    Much appreciated for any help.

    To create an APK package, use the ADT package command, setting the target type to apk for release builds, apk-debug for debug builds, or apk-emulator for release-mode builds for running on an emulator.
    adt     -package
        -target apk
        -storetype pkcs12 -keystore ../codesign.p12
        myApp.apk
        myApp-app.xml
        myApp.swf icons
    Type the entire command on a single line; line breaks in the above example are only present to make it easier to read. Also, the example assumes that the path to the ADT tool is on your command-line shell’s path definition. (See Path environment variables for help.)
    You must run the command from the directory containing the application files. The application files in the example are myApp-app.xml (the application descriptor file), myApp.swf, and an icons directory.
    When you run the command as shown, ADT will prompt you for the keystore password. (The password characters you type are not displayed; just press Enter when you are done typing.)
    You can find more details here

  • How to get Android apps with dauphin browser

    Hi.. l did try to get Android apps with dauphin browser but it keep sending me back to BB apps what do i have to do to get tout Android apps...
    Thanks in advance for helping.

    Ok your loosing me a bit here. why are you going thru a browser to download an app... just go into the appworld  (app) on your playbook and have a look thru them to see what you want to download and then do it that way... as far as android apps are concerned, they are not shown in appworld any differently than others...  you can do a search for them as well in the top right corner if you need...if its been made available for BBPB it should be there...
    hope this is some help... 

  • When will we be able to create Android Apps with DPS single edition?

    When will we be able to create Android Apps with DPS single edition?

    It's something that we would like to do, but it is unlikely to happen during the first half of 2013.
    Neil

  • IPad 3 with iOS 7: Any way to close/exit all apps with one action?

    While there are some things that I like about iOS 7, there is one long term gripe that I have that's been made worse by iOS 7.  I have an iPad 3, and usually close (exit) all the apps that I've used that day at the end of the day, then put the iPad on the charger for the night.  I'm really tired of having to fling all the apps off the screen to close them...being able to do this with 2 or 3 apps at a time is really not helpful, either *smile*.
    Is there any way that I can just close all the open apps with one gesture or action?  This would be so nice, flinging apps off the screen is not an improvement for me over the previous method of tapping on X's, what would be an improvement would be to not have to do that to close all the open apps.  Flinging isn't bad for one or two apps, but for 10 or 15, no, I can't say that it isn't really boring and annoying.  Even Android has an option to "close all", good grief.
    Thanks for any help with this.

    Most apps close automatically when you press the home button and move to the next app. Apps only need swipe closing if they are misbehaving or you purposefully left them open. The most notable exception being the music apps which because of their ability to play in the background always closing. In short if you're worried about saving time by swiping apps there's no need to swipe any.

  • Unable to start the android app while clicking the appropriate file

    Hi I have developed andoid app and now I am porting it on bb z10 using eclipse plugin. I have set intent filter in AndroidManifest.xml which should allow any file with .camem extension to start the app. It happens in original android app in android mobile but it does not happen in ported BB app in BB z10 phone. Please help. My AndroidManifest.xml is given below:
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ca.secure.mail"
    android:versionCode="1"
    android:versionName="2014Q2 Sprint1" >
    <uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="16" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <application
    android:name=".util.DatabaseManager"
    android:enabled="true"
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:theme="@style/EmailTheme" >
    <activity
    android:name=".ui.ReadHTMLActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:excludeFromRecents="true"
    android:label="@string/app_name" >
    <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:pathPattern="*.htm" />
    <data android:mimeType="text/html" />
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:pathPattern="*.camem" />
    <data android:mimeType="application/octet-stream" />
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:pathPattern="*.camem" />
    <data android:mimeType="application/camem" />
    </intent-filter>
    </activity>
    <activity
    android:name=".ui.SaveArcotIDActivity"
    android:configChanges="orientation|keyboardHidden|screenSize" >
    <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="esend" >
    </data>
    </intent-filter>
    </activity>
    <activity
    android:name=".ui.PasswordActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:exported="false"
    android:label="@string/app_name" />
    <activity
    android:name=".ui.SplashScreen"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:excludeFromRecents="true"
    android:label="@string/app_name" >
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <activity
    android:name=".ui.DecryptedContentActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:exported="false"
    android:label="@string/app_name" />
    <activity
    android:name=".ui.TutorialActivity"
    android:exported="false"
    android:label="@string/app_name" />
    <activity
    android:name=".ui.RRFActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:exported="false"
    android:label="@string/app_name" />
    <activity
    android:name="com.ca.mam.emmlib.app.LibLoginActivity"
    android:exported="false"
    android:label="@string/app_name" />
    </application>
    </manifest>

    You're in the Device Support Forums. You might be best to post this in the Developer Forums for better exposure to those who could assist you. Chances are a moderator will move it for you.
    Cheers.  
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • Seriously, No Android App to view CC stored files?

    Come on Adobe.
    Seriously, you don't have an Android App to access my "files" in my new creative cloud? Isn't that the point that I can view my CC files on a tablet or phone? It can't be that hard to write such an App.
    Or maybe look at Dropbox. I can see my files on my tablet with their app.

    For viewing and limited processing on Android, look at PS Touch.  Limit I see is the image size which is related the Android memory.
    PS Touch - phone   https://play.google.com/store/apps/details?id=air.com.adobe.pstouchphone&hl=en  $4.99.
                    - tablet    https://play.google.com/store/apps/details?id=air.com.adobe.pstouch&hl=en  $9.99
    DropBox works well also.
    RONC

  • Native android apps - with DPS single edition?

    Can you build native android apps also with DPS single edition or only with enterprise edition?
    Thank you for you help!

    Thank you for your reply, Bob!
    I've forgotten to ask the most important thing: This also stays that way for DPS V30?
    Thank you!

  • Creating a Simple IOS / Android APP with web pages?

    Hi all,
    Recently I created a simple backend database driven website for a clients customers to see their info. The client wants to have his own "Company App", primarily for the marketing aspects. I was thinking that it might be possible to have a super simple basic app just showing/using the web pages that we already have.
    I already made some pages with custom tailored css to iphone and could expand this concept to other models - android etc.
    I have never tried to make an ios or andriod app before, but...
    Q: Would it be possible to create a simple app DEMO that can display/use the css iphone page I already made? If I wanted to look more into this (and even work with other dev's) where would I start?

    Mobile Apps are standalone pieces of mobile software that you design, compile with Phone Gap and then upload to Google Play or Apple's App store.  From there mobile users can purchase (most are free) download & install apps on their device.   Apps include just about everything from GPS & traffic info, to sports, games, entertainment, health & fitness tracking. You name it, it's probably out there.   A mobile app is not a web site, although the app may indeed be tied to the creator's web site so he can sell more apps.   But an app is just an app.  A web site is a web site.  2 different things.
    If you want to explore Mobile App development, I recommend this introductory tutorial
    Create & package Mobile app with DW, jQuery Mobile & PhoneGap
    http://www.adobe.com/devnet/dreamweaver/articles/dw-phonegap-mobile-app.html
    Nancy O.

  • Genereate an android app with single edition ?

    Hello to all
    How to Build an Android application with DPS Single Edition?
    I saw "Aquafadas solution" have the advantage of being able to generate Apps for any support, which makes sense!
    But then, I'm trained, perfected for months on the DPS, but it is not simple for me to trainning Aquafadas again  : - \, especially since I do not find it necessarily intuitive ... it is my opinion Personal.
    Is there any other solution to generate an application on your iPhone or Android device with another tt the single Edition?! unless you go on the Professional or Entreprise solution??
    Frankly, even for Adobe, I see they have a significant shortfall, even if they are generating app for "Free" for iPad only THAT, they should at least provide a winning formula for each device but that it is at least accessible to little companies, as do the AQUAFADAS solution as well.
    To my knowledge the only way to generate it is to switch to formula DPS business or pro price completely unacceptable finally pay € 4,000 / year that's crazy!
    A solution proposal?
    PS. Sorry for my english

    You can’t. DPS SE is iPad only.

  • Code to do a completely external actionscript 3 file?

    If it's not too much trouble, could somebody post an actionscript .as file that would draw a rectangle on the flash stage, with the ONLY thing in Flash being the property assignment that you have to do.
    I'm really new to this, and I have not been able to find any tutorials on this topic (other than someone telling me that the tutorials are out there).  I want to start hacking around with Actionscript and Flash, but I'm really frustrated because I can't get started.
    I DON"T want to put code in the timeline, use code snippets, or use the actions window.
    References to specific tutorials would be really appreciated.
    Thanks!

    Here is a class that draws rectangle:
    package
         import flash.display.Graphics;
         import flash.display.Shape;
         import flash.display.Sprite;
         import flash.events.Event;
         public class ObjectWithRectangle extends Sprite
              public var fillColor:uint = 0xff0000;
              public var strokeColor:uint = 0x00ff00;
              public var rWidth:Number = 100;
              public var rHeight:Number = 100;
              public function ObjectWithRectangle()
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              private function init(e:Event = null):void
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   var rectangle:Shape = new Shape();
                   var g:Graphics = rectangle.graphics;
                   g.lineStyle(1, strokeColor);
                   g.beginFill(fillColor);
                   g.drawRect(0, 0, rWidth, rHeight);
                   g.endFill();
                   addChild(rectangle);
    Here is a class that implements the above class - if you make it a document class is Flash IDE - it will show a rectangle with random colors:
    package
         import flash.display.Sprite;
         import flash.events.Event;
         public class DocClass extends Sprite
              public function DocClass()
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              private function init(e:Event = null):void
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   var rect:ObjectWithRectangle = new ObjectWithRectangle();
                   rect.fillColor = 0xffffff * Math.random();
                   rect.strokeColor = 0xffffff * Math.random();
                   rect.rWidth = 200;
                   rect.rHeight = 250;
                   addChild(rect);

  • Android Apps with Captivate

    Hello,
    I would like to create app for Android smartphones with Captivate.
    I'm looking for the best practices how to do it.
    Could you you send me links to demos of simple / any apps created with Captivate
    dedicated to Android operating system? Or guide book how to do it?
    Kind regards,
    Michal

    Thank you for your reply, Bob!
    I've forgotten to ask the most important thing: This also stays that way for DPS V30?
    Thank you!

  • I can't create a native android app with 2560x1600 rendition. I only see the 2048x1536 and 1024x768 option in the web native Android application ?

    Hello All,
    i ve created a native android app. I need to publish on a 2560x1600 android tab. the problem is that in my library i have my 2048x1536 and 1024x768 ipad version.
    I know that when i create my native Android app i should be able to chose my rendition in only 2560x1600 but in the Library Tab of de web android native app builder I only see the 2048x1536 and 1024x768 option.
    Please do you have an idea ?
    TX

    The dropdown only lists the folio sizes you have published in your app's publication account. Make sure you've actually published a 2560x1600 folio and then you'll be able to select it from the dropdown.
    Neil

Maybe you are looking for

  • External Hard Drive Will Not Appear

    I have a western digital external HD which I bought last year. I have used it to store movies and back ups transferring by usb. Last week I tried connecting again and now the HD icon does not appear on my desktop. I have tried several times and in di

  • How can I see the photos of iPhoto in a TV  via Air Play ?

    how can I see the photos of iPhoto in a TV  via Air Play ? I have a MacBook Pro ( dec 2010) v. 10.7.5

  • How to read values of CRM Activity Survey

    Hi Folks In our CRM 3.1 system, our customizer has customized a Survey when creating af Activity. And it works fine. Now She need a ABAP report, which among other values, is going to write out the values registered in the SUrvey. As far as I can see

  • 16:9 - HOW to generate automatic 16:9 playback on widescreen

    I've done numerous tests - Trying to make my DVD playback on a widescreen TV set to be automatic. I've seen many "hollywood titles", where my TV system switches automatically to "Wide", but when I start to play my own DVDSP disc, it is being displaye

  • To make BI Beans work with Oracle 9i Database for Windows...

    I have tried the following combination Oracle Database 9.0.1.2 + Patch 3(Patchset:2227410) Jdevelper9i RC BI Beans RC But, when I tried to create a new calculation or new presentation, I got "Connection information is incomplete, Service Name is not