Category Archives: Action Script3

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:

    import flash.desktop.NativeApplication;
    import flash.display.Sprite;

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

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

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

Read more :
Leave a comment

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


Proscenium framework tutorial

In this tutorial you’ll take a look at several different ActionScript class files that are used to create 3D sample projects with the Proscenium framework, an ActionScript 3 code library built on top of the Adobe Flash Platform Stage3D APIs that allows for rapid development of interactive 3D content. The goal of this quick introduction is to familiarize you with the Proscenium framework to control 3D elements in Adobe Flash Professional.

Before you begin, be sure to download the Proscenium framework from Adobe Labs and uncompress the ZIP file to your desktop so that you can follow along and open the corresponding AS file as you work through each section in this tutorial. You can analyze the code to see how each step is achieved programmatically.

The sample project class files are located in the code\ProsceniumTutorials\src folder within the Proscenium framework ZIP file. These samples can be compiled and run once the Proscenium project is set up. To set up the project, please be sure to read the setup instructions provided in the sample files.

The sections below cover how to create 3D objects and add them to the scene to display them. You’ll also learn how to change a 3D object’s material properties, move objects, and add shadows. In the last section of this tutorial, you’ll use a class that extends the Sprite class to see how to build a Proscenium application without using the BasicDemo harness class used by the other sections. By extending the Sprite class, you’ll gain more control when working with 3D objects and configuring event handlers.

Click here for tutorial

Leave a comment

Posted by on October 25, 2011 in 3d development, Action Script3, flash


Flash Player 11 and AIR 3 Now Available

Flash Player 11 and AIR 3 are now available for download.

For additional information including detailed information on new features, please see this release notes.


ActionScript 3 samples for Flash Professional

These ActionScript 3 samples demonstrate various features common in Adobe Flash Professional CS5 development. Some samples are complete applications, while others simply introduce a concept that you can use to build your own apps. Use these files to investigate how each of the samples was constructed. Explore the graphics and timelines in the FLA files, and explore the ActionScript code in the associated AS files.

Samples are rated Beginning, Intermediate, and Advanced. Intermediate developers and people with prior experience in ActionScript 2 will be interested in looking at the code to see how it works in ActionScript 3.

Download source files for all samples: (7.6 MB)

Click here for download individual source files on each sample’s detail page below.


Leave a comment

Posted by on October 10, 2011 in Action Script3, flash


Proscenium – Easily and rapidly develop interactive 3D content in Flash

Welcome to the preview release of “Proscenium” (codename). Proscenium is an ActionScript 3 code library built on top of the Adobe® Flash® Platform Stage3D APIs that allows for rapid development of interactive 3D content.

Stage 3D comprises a new set of low-level, GPU-accelerated 3D APIs that will enable advanced 3D experiences across screens through the Adobe Flash Platform runtimes. These new low-level APIs will provide advanced 3D and 3D engine developers the flexibility to leverage GPU hardware acceleration for significant performance gains.

he Proscenium preview is prerelease software that is not supported by Adobe and may contain bugs. Please also note that as a research project, there is no assurance that there will be a shipping version of Proscenium.

Click here for download Proscenium

Leave a comment

Posted by on October 6, 2011 in 3d development, Action Script3, flash


How to use Flash Player 11 & AIR 3 with Flash Professional CS5.5

Issue : VerifyError: Error #1014: La classe flash.display3D::Context3D could not be found.

Stage3D will work with web browser. For remove this above issue, set  wmode=”DIRECT” in HTML 


Download Adobe AIR 3 SDK from here 

Download the PlayerGlobal.swc to target the 11.0 APIs(for FlashPlayer 11) from here

Targeting Adobe Flash Player 11 Release Candidate for Desktops.

1.- Download the Flash Player 11 Release Candidate.
First things first go to the Adobe Labs site and download the Adobe Flash Player 11 Release Candidate for Desktops. Download the proper player for Your system ( Is important that You download and install the runtime on Your browser otherwise you won’t be able to test your SWFs as there is no Standalone RC1 version). You need to download the Flash Player 11 Release Candidate Global SWC “playerglobal.swc” as well.

2.- Once You installed Flash Player in the browser and renamed the swc file from flashplayer11_rc1_playerglobal_090611 to “playerglobal.swc” go to “/Applications/Adobe Flash CS5.5/Common/Configuration/ActionScript 3.0″ and create a new folder i named mine FP11_RC1 and copy your playerglobal.swc file inside the folder you just created.

3.- Now You need a new player profile so You can choose the Flash Player 11 RC1 from the available player versions when working with Flash, go to “ /Applications/Adobe Flash CS5.5/Common/Configuration/Players/”  duplicate the FlashPlayer10_2 2.xml and give it a new name to the file You just copy I named mine FlashPlayer11_RC1.xml.

4.- Open that file in a text editor and change the id and version in the player tag for id give it the name You wish to be displayed in the Player panel inside of Flash I named mine “FlashPlayer11_RC1″ and change the version to “13″.

6.- Save the file open Flash CS5.5 and You’re good to go.

Targeting Adobe AIR 3 Release Candidate.

1.- Download the AIR 3.0 Release Candidate.
First thing You need is the Adobe AIR 3 SDK Release Candidate.

2.- Unzip Your AIR SDK if You’re on Mac the file will be named ” air3_rc1_sdk_mac_090611.tbz2″

3.- Close Flash Professional CS5.5 and browse o the AIR 2.6 folder, on Mac it will be in the following location
“/Applications/Adobe Flash CS5.5”

4.- Change the AIR2.6 folder name to something like AIR2.6_old.

5.- Rename the folder You previously unzipped to AIR2.6 and place it on the Flash Professional CS5.5 folder “/Applications/Adobe Flash CS5.5”.

6.- Browse to the AIR2.6/frameworks/libs/air/ folder and copy the airglobal.swc.

7.- Paste the SWC file in the folder “/Applications/Adobe Flash CS5.5/Common/Configuration/ActionScript 3.0/AIR2.6” it wil replace your copy of  the airglobal.swf file.

8.- Browse to the “/Applications/Adobe Flash CS5.5/Common/Configuration/Players” folder and open the following files with a text editor:  AdobeAIR2_6.xml, AiriPhone.xml, or Android.xml.

9.- Change the version attribute in the player tag from 11 to 13 and save the files:

On the Android xml file: <player id="android_0" version="13" asversion="3" minasversion="3"></player>

On the AdobeAIR2_6 xml file: <player id="AdobeAIR2_6" version="13" asversion="3" minasversion="3"></player>

10.- Browse to the “/Applications/Adobe Flash CS5.5/AIR2.6/samples/” and open the descriptor-sample.xml file.

11.- Change the “; namespace URL to “;.

<application xmlns="" minimumpatchlevel="0"></application>

12.- Save the file and open Flash.


Testing time: Click Here for Read More


Top five misperceptions about ActionScript

  1. ActionScript 3 is difficult to learnActionScript 3 is no more difficult to learn than any other programming or scripting language. If you are familiar with ActionScript 2, the language semantics are pretty much the same, although you will need to learn new ways of doing some common tasks. Because the ActionScript 3 APIs are more consistent, learning one new concept and API applies to multiple APIs, making it easier to use newly found knowledge to learn new features and functionality.
  2. ActionScript 3 is only for object-oriented programmersActionScript 3 can be used for both class-based, object-oriented programming, as well as timeline-based scripting. You can use it in whichever way is the most comfortable for you or makes the most sense for your project.
  3. Targeting ActionScript 3 reduces the Flash Player base that you can targetAs of December 2008, content targeted for Flash Player 9, the first version that supported ActionScript 3, can be viewed by 98.6% of computers on the Internet.
  4. You can’t write code on the timeline with ActionScript 3You can place code on the timeline just as you can with ActionScript 1 and 2.
  5. ActionScript 2 development is faster than ActionScript 3While some tasks can require more code in ActionScript 3 than in ActionScript 2, overall development and maintenance time should be the same or less than in ActionScript 2.0 due to improved debugging and better compile-time error catching. Basically, in some cases there may be more code, but it will be much easier to find errors


Leave a comment

Posted by on September 25, 2011 in Action Script3