How to exit your applications for AIR for iOS in ActionScript 3

Hi everybody,
I have created a game for iOS. I wanted to terminate the application once the person presses the back button within the iPhone. Does anyone know how to achieve that?
I have searched and they only have the command for the Android using this method :
if(Capabilities.cpuArchitecture=="ARM"){
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
function handleDeactivate(event:Event):void
    NativeApplication.nativeApplication.exit();
How about iOS devices?
Thanks!

Sorry i might be way off the mark, I haven't done any mobile application programming in AS I tend to do it natively.
but i assume you use NativeApplication for your launch point, and then nativeApplication.exit should exit the app. easy enough to link to one of you own buttons.
as for the home button i found this on the net
import flash.events.Event;
addEventListener(Event.ACTIVATE, activateListener);
addEventListener(Event.DEACTIVATE, deactivateListener);
private function activateListener(e:Event):void{
        //do something when awakened
private function deactivateListener(e:Event):void{
        //do something when home button is pressed.

Similar Messages

  • Hi can anyone help me how to get facetime application for iphone 4s

    Hi
    can anyone help me how to get facetime application for iphone 4s since i am not able to find it.

    FaceTime is builtin, there's no icon. Use your Contacts app and if the recipient has iPhone 4/4S, iPod Touch 4th G, iPad 2 or Mac, you can FaceTime them using Wi-Fi.
    Message was edited by: ckuan

  • Java.lang.NullPointerException is thrown when packaging Adobe AIR application for iOS

    Hi All,
    https://bugbase.adobe.com/index.cfm?event=bug&id=3071298
    As per above link this bug resolve(latest build) but i am facing  Java.lang.NullPointerException is thrown when packaging Adobe AIR application for iOS, using the packaging tools.
    (for  inappPurchase Demo app --- i used below link code)
    http://code.google.com/p/in-app-purchase-air-ios/
    Thanks,
    Sunil Rana

    Hi Everyone,
    I'm getting basically the same error. Are there any rules or guidelines that we are suppose follow when writing an app for iOS? Is there a way to know exactly where it is crashing? My apps are not MXML, only actionscript. Also I made sure I have no errors not even warnings in my SWF file, but still no go! 
    Getting the same error.
    Exception in thread "main" java.lang.NullPointerException
            at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6944)
            at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:5909)
            at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4628)
            at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)
            at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215)
            at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:526)
            at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
            at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler
    .java:472)
            at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
    Compilation failed while executing : ADT
    regards,
    Keith

  • How can i download applications for my mac

    How can i download applications for my mac for free

    At the App Store you can download any file that is available for free. Then there are other sites such as MacUpdate.com where you can also find free files to download.

  • How to Create New Application for iPhone

    Hi,
    Can anyone guide me how to create New Applications for the iPhone.
    Regards,
    Mustafa Ali Qizilbash

    If you think Apple's is making a profit off the $99 it collects for the iPhone Developer Program membership, you're badly underestimating how much it costs to run the program.

  • How can i download applications for i phone without error 1009

    how can i download applications for my i phone without error 1009? yahoomessenger, facebook, e books application etc please help me mu i phone has ios 4.0 and i tune10

    https://www.mozilla.org/firefox/all/
    https://www.mozilla.org/thunderbird/all.html
    Full setup of Firefox and Thunderbird can be downloaded from those links instead of getting the online stub installers.

  • HT4623 i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS

    i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS

    look at this thread
    https://discussions.apple.com/message/22837309#22837309

  • HT5621 How to change your question for iTunes I for got them ...?

    How to change your question for iTunes I forgot them ...?

    Your question is unclear and confusing...
    Apple ID FAQs
    http://support.apple.com/kb/HE37

  • How to optimize your PC for the 0404 USB and 0202 USB

    This is a guide on optimizing your system for the 0404 USB and 0202 USB.
    Make sure the 0404 USB is using a USB HOST that is on an IRQ alone. This means no other device in the PC can be sharing its IRQ.
    If you are running a hyper-threaded CPU, by turning hyperthreading off from the bios. You can set the latency at 20ms or lower and you will usually not have any latency issues.
    Change Processor Scheduling to 'Background Services' - Navigate to the Advanced page of the System applet. Click on the Performance Settings button, select its Advanced tab and click on 'Background Services' for Processor Scheduling.
    Switch Off Power Schemes - In the Power Options applet, choose the 'Always On' power scheme. Change the settings for monitor and hard disk turn off and System standby to 'Never', so that your PC doesn't unexpectedly conk out during song playback
    Disable System Sounds - Select the 'No Sounds' scheme on the Sounds tab of the Sounds and Audio Devices applet.
    Make sure legacy USB support is disabled in your BIOS.

    Hi everybody.
    This message to share my experience of the 0404 USB under Windows 7.
    I previously operated this sound adapter under Windows XP and it was working fine with my pipe organ simulator (Hauptwerk).
    When I switched to W7 on a Dell Vostro (professionnal series), sound was muting after exactly one minute . The same with a video on Yutube.....
    I did all the adjustments suggested here and there on the web (sampling rate, drivers) , I tried to operate at moonlight, I shot a chicken, etc ...
    After many manipulations, I noticed that, if I was doing "something", for instance moving the sound level up and down, the sound was going on ....
    The solution was in part at the beginning of the topic "how to optimize your PC for th 0404, etc ....".
    The keyword is "interrruption".
    As a matter of fact, the Dell laptop is strongly closed. The BIOS allows no adjustment of nothing.... No way to control interruptions allocation.
    BUT!!! I noticed that the two USB 2.0 ports are located very far away from each other. I supposed there would be TWO controlling chips. And I tried the second one. AND IT WORKED!
    So the E-MU guy is right, the device must get a free interruption line to operate ....!

  • I am looking for a good development application for IOS. Please help me.Thanks.

    I am looking for a good development application for IOS. Please help me.Thanks.

    Xcode is required to submit your app to the App Store. So at some point (even if it is just to submit) you will need to use it.

  • How can i delete apps for IOS 7.0.6 when i press the home key the "X" key doesnt appear

    how can i delete apps for IOS 7.0.6 when i press the home key the "X" key doesnt appear?

    Hi-
    This worked!. After updating to 7.0.6 a few days ago I was unable to delete apps. Called Apple support for help without success. I have NEVER entered a passcode to get in to restrictions so I know I didn't make this change (so I'm assuming that 7.0.6 did it for me). Apple wanted me to restore my iphone but thought I'd do more research first. Your advice solved the problem. THANKS!

  • How to upgrade my iPhone for iOS 4.0

    how to upgrade my iPhone for iOS 4.0

    If you have an iPhone 3g you can upgrade to iOS 4.2.1.  If you have a 3gs or later, you can upgrade to iOS 6 (only).  Connect your phone to the computer you normally sync with, and update from iTunes.
    The User Guide is available at http://support.apple.com/manuals/ or downloadable from iTunes as an iBook.

  • How to secure BSP applications for external users on the internet?

    I posted this question under Enterprise Portal forum but got no response. I am hoping some of you experts in this area can help.
    We have developed BSP applications and set them up as iViews in Enterprise Portal 6. Our portal implementation will be used by external users.
    We have security concerns that the access to the BSPs  allows external users direct access to the R/3 system. We were told that we should use ITS application instead of BSP application for external users.
    Do any of you have any insight into how we could work around the security problem with BSP applications, or BSP applications in EP6? Your help will be greatly appreciated.

    In sense they are correct as to whether it is more secure or not would have to be a call by people who are more of an expert than myself.
    But I can see there point the BSP runs directly on the system and uses the system security where as the ITS is basically just an RFC call. However for us we use a 620 server with BSP's and make RFC calls to our R/3 systems thus keeping people of the R/3 directly - however we are not opened to the Internet.
    If your message is answered please remember to mark it solved so others searching in the future can find the solved ones quicker - just click on the yellow star.

  • Java.lang.NullPointerException is thrown when packaging Adobe AIR 3 application for iOS

    I just update my AIR project for iOS from Adobe AIR 2.6 to Adobe AIR 3.1 (that comes with Flash Builder 4.6), than I always got an exception when packaging my application:
    Error occurred while packaging the application:
        Exception in thread "main" java.lang.NullPointerException
            at adobe.abc.Nsset.match(Nsset.java:263)
            at adobe.abc.Name.match(Name.java:555)
            at adobe.abc.Symtab.getEntry(Symtab.java:37)
            at adobe.abc.Symtab.get(Symtab.java:55)
            at adobe.abc.Type.setNeedsArgumentsUpInheritanceHierarchy(Type.java:343)
            at adobe.abc.Type.setNeedsArgumentsUptoRoot(Type.java:269)
            at adobe.abc.GlobalOptimizer$InputAbc.resolveType(GlobalOptimizer.java:558)
            at adobe.abc.GlobalOptimizer$InputAbc.resolveType(GlobalOptimizer.java:448)
            at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:327)
            at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
            at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
        Compilation failed while executing : ADT
    What is the cause of this error, so I can avoid it in my project before AIR team fix this?
    Thank you.

    Hi Everyone,
    I'm getting basically the same error. Are there any rules or guidelines that we are suppose follow when writing an app for iOS? Is there a way to know exactly where it is crashing? My apps are not MXML, only actionscript. Also I made sure I have no errors not even warnings in my SWF file, but still no go! 
    Getting the same error.
    Exception in thread "main" java.lang.NullPointerException
            at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6944)
            at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:5909)
            at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4628)
            at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)
            at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215)
            at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:526)
            at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
            at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler
    .java:472)
            at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
    Compilation failed while executing : ADT
    regards,
    Keith

  • How to get bom application for a material

    hi abapers
              how can we get the bom application for a particular material.
              suggest me a suitable tables.
              thanks in advance.
    Regards
    Rajaram

    Hi,
    for BOM related tables are MAST+STPO.
    and for 1 st case
    Use the report CS15 - Where Used List: Material in BOM
    Give the material number for which you want to find where it is used.
    In the Type of Where Used List Check the Direct checkbox,
    and in Used in Check the Material BOM,
    Then Click on the Next Screen button available on the Top left cornerof the screen.
    Then in the next screen give the plant number and execute.
    This gives you the report of where ever this material is used.
    Regards
    Message was edited by:
            skk

Maybe you are looking for

  • Why is my iPad Mini freezing when I try to load data?

    My iPad Mini is freezing when I attempt to use any data at all, including, but not limited to: -Notes -Contacts -Safari (History, Back Button) -Apps (Shows loading screen with no progress, turning off and on shows a freezed screen of the completed ga

  • KT6 Delta Rebooting Issues - Solution that Worked for me

    Hi Solution that worked for me: Enabled SATA Controller which takes a while for it to detect SATA Drive and giving time for the system to warm up.  I don't get that annoying message asking to restart Windows in safe mode, normal, & etc.   I've been h

  • Check box problem in struts

    I am getting several checkboxes on a JSP form that are created depending on the no. of iterator values. e.g. <s:iterator value="group"> <s:checkbox name="check"/> <s:textfield name="name"/> </s:iterator> Now all the check boxes created are having sam

  • 16 sec pause before mythtvfrontend loads [solved]

    Seems that mythfrontend take about 15 sec to load on a pretty fast C2D machine.  Below are the errors in my logfile.  Any ideas what might be causing this? $ mythfrontend --logpath /tmp 2012-04-26 17:18:08.655238 C [4245/4245] thread_unknown mythcomm

  • While adding localization for appstore meta data, I cannot find the language Polish (Polski)

    While adding localization for appstore meta data, I cannot find the language Polish (Polski) under the option Choose another language: in iTunes connect. I am updating the app to a newer version. I need to show the App description etc in Polish too.