RSS

Monthly Archives: November 2011

Store data in AIR applications for iOS devices

Saving state on iOS devices

We envisioned the scenario of applications that lose data when they are interrupted. Of course, the built-in iOS apps don’t do that—when you go back to your text messages after that interrupting phone call, you pick up right where you left off. This is done by the simple expedient of saving state when the application is ordered to quit by the OS. In the Objective-C world, you will have to implement this yourself (see the appropriate section of the iOS Application Programming Guide), and it is no different when you are developing with Flash.

Saving on exit

How do you know when to save in Flash? Since AIR applications for iOS share the same API as AIR apps for Adobe AIR, you can listen for the NativeApplication.EXITING event to know when to save your state:

package 
{
    import flash.desktop.NativeApplication;
    import flash.display.Sprite;
    import flash.events.Event;

    public class Save1 extends Sprite
    {
        public function Save1()
        {
            // Listen for exiting event.   
            NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExit);

            // Load data.           ;
            load();
        }
        private function onExit(e:Event):void
        {
            trace("Save here.");
        }

        private function load():void
        {
            trace("Load here.");
        }

    }
}
Read more : http://www.adobe.com/devnet/flash/articles/saving_state_air_apps.html
Advertisements
 
Leave a comment

Posted by on November 11, 2011 in Action Script3, Adobe Air, iPhone

 

Adobe Flash Player 11.1 and Adobe AIR 3.1 are Now Available!

As a follow-up to the highly anticipated release of Adobe Flash Player 11 and Adobe AIR 3, which included next-generation technologies like the gorgeous, cinematic 2D and 3D hardware accelerated graphics of Stage 3D, we’re pleased to announce the availability of Flash Player 11.1 and Adobe AIR 3.1 for desktops and mobile devices.

As we communicated yesterday, we see a very bright future for both Flash and HTML5. We’re committed to helping Flash developers deliver stunning, immersive experiences across devices — helping you reach over a billion people across desktop browsers and create Flash-based apps to reach over 350 million smartphones and tablets this year alone. It’s great to see the thousands of amazing Flash-based apps you’ve already published across all of the major app stores — for iPhone, iPad, Android phones and tablets, the BlackBerry PlayBook, Barnes and Noble Nook tablets, and the Amazon Kindle Fire. Whether in the browser on 99% of PCs or through apps for phones and tablets, Flash bridges the gap between your incredible ideas and what over a billion people can experience.

We’re also excited about the new innovations like Stage 3D hardware acceleration. Only a month after its launch, it now enables beautiful, fluid, next-generation visuals for more people on the web than any other technology. And we’ll continue driving innovation in Flash and by contributing to web standards. Now that we are focusing on enabling Flash-based content via apps on mobile devices, this release will be the last version of the browser plug-in for mobile devices. We’ll continue to provide bug fixes and security updates for the mobile browser plug-in — and we’ll deliver new Flash innovations for smartphones and tablets via AIR, allowing you to take full advantage of Flash on iOS, Android, and BlackBerry PlayBook devices.

This minor update to Flash Player and AIR includes the following features for developers:

  • Updated iOS 5 native extensions for Adobe AIR: Flash-based apps can now take advantage of new services provided by iOS 5. Create apps that integrate the latest iOS 5 capabilities like iCloud and iMessage.
  • Updated Native text input UI for Android:  Android apps can now take advantage of the same native text input controls provided to BlackBerry Tablet OS and iOS operating systems to provide platform-specific user interaction behaviors such as magnification and text selection.
 
Leave a comment

Posted by on November 11, 2011 in Adobe Air, flash