Targeting Flash Player 11 & AIR 3 Release Candidates in Flash Professional CS5.5

Post image of Targeting Flash Player 11 & AIR 3 Release Candidates in Flash Professional CS5.5
Filed in ADOBE FLASH PLATFORM , FEATURED , FRAMEWORKS , GENERAL 18 comments

This post was written before Adobe made the announcement that the Flash Player 11 and AIR 3.0 runtime will be available next month.

Although all of my projects are coded in FDT4 I still use Flash Professional on a regular basis that because a great part of those projects have complex timeline animations usually made by the animation artist working in the project so my workflow usually involves the Flash IDE for exporting the final swf, here is a guide on how to set up Your copy of Adobe Flash Professional CS5.5 to target the Flash Player 11 and AIR 3.0 Release Candidates, let’s get started:

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


   Flash Player 11_RC1

5.- In the same file change the path tag so it points to the folder You just created:


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


 

*Note* Remember that there's no Standalone for Flash Player 11 RC1 so when You test your project in Flash ht command + F12 in order to publish to browser (Where You should have the Flash Player 11 RC1 plugin installed by now.

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:

On the AiriPhone xml file:

On the AdobeAIR2_6 xml file:

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

11.- Change the "http://ns.adobe.com/air/application/2.6" namespace URL to "http://ns.adobe.com/air/application/3.0".

12.- Save the file and open Flash.

Testing time:

In order to see that You're targeting the RC1 versions of the Flash PLayer 11 and AIR 3.0 here are 2 quick tests:

To test Flash Player 11:
1.- Open the Flash IDE go to File > New > ActionScript 3.0 to create a new flash document in the Player section of the Properties panel select the "Flash Player 11_RC1" as your player version.

2.- With the first frame selected go to Window > Actions to open the ActionScript panel and write the following.

import flash.display.Stage3D;

var stage3d = new Stage3D();   

var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFF0000;
my_fmt.size = 32;
my_fmt.bold = true;
my_fmt.font  = "Arial";

var textF: TextField = new TextField;
textF.defaultTextFormat = my_fmt;
textF.autoSize = TextFieldAutoSize.LEFT;
textF.text = "Hello Flash Player: " + Capabilities.version + "\n" + stage3d;

addChild(textF);

Here we are importing one of the classes only available to FP11 "Stage3D" and creating a text field to display the version of Flash Player installed in our browser.

3.- Hit Command + F12 to publish to browser if we did everything ok You should see your swf displaying the player version and the Stage3D object.

To test AIR 3.0:

1.- Open the Flash IDE go to File > New > AIR to create a new flash for AIR document in the Player section of the Properties panel select the "AIR 2.6" as your player version.

2.- With the first frame selected go to Window > Actions to open the ActionScript panel and write the following.

import flash.display.Stage3D;
import flash.desktop.NativeApplication;
import flash.text.TextField;

function air3_test(){
	var stage3d = new Stage3D();
	var my_fmt:TextFormat = new TextFormat();
	my_fmt.color = 0xFF0000;
	my_fmt.size = 32;
	my_fmt.bold = true;
	my_fmt.font  = "Arial";
	var textF: TextField = new TextField;
	textF.defaultTextFormat = my_fmt;
	textF.autoSize = TextFieldAutoSize.LEFT;
	textF.text = "Hello AIR Version No. " + NativeApplication.nativeApplication.runtimeVersion +"\n" + stage3d;
	addChild(textF);
	trace ( "+ Flash CS5.5.air3_test() - args: " + [stage3d,"AIR Version: " + NativeApplication.nativeApplication.runtimeVersion ] );
}

air3_test();

Here we are importing one of the classes only available to FP11 "Stage3D" and creating a text field to display the version of Flash Player using the "NativeApplication" class.

3.- Go to Debug > Debug Movie > in AIR Debug Launcher(Desktop) to publish our file if we did everything ok You should see your swf displaying the AIR version and the Stage3D object.

And that's it, thanks for reading and Happy Flashing.

Posted by swfgeek   @   26 September 2011 18 comments
Tags : , , , ,

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

18 Comments

Comments
Oct 5, 2011
7:12 am
#1 forrestuv :

nice guide :)
btw when TESTING in Air3, I cannot requestContext3D because of : Error #2044: Unhandled ErrorEvent:. text=Error #3702: Context3D not available.

what’s the problem?I’m able to build air apps and it works inside browser but NOT the testing feature… :(

Author Oct 5, 2011
10:42 am
#2 swfgeek :

All You need to do is change the render mode to:

   gpu  

in the application file descriptor.

Here’s some code to trace Your 3D driver to the output console:

import flash.display.Stage3D;
import flash.display3D.Context3D;
import flash.display3D.Context3DRenderMode;

var stage3d = this.stage.stage3Ds[0];
stage3d.addEventListener( Event.CONTEXT3D_CREATE, contextCreated );
stage3d.requestContext3D( Context3DRenderMode.AUTO );

function contextCreated( event : Event ) : void {
    var renderContext:Context3D;
    renderContext = Stage3D( event.target ).context3D;
    trace( "3D driver: " + renderContext.driverInfo );
}
Oct 12, 2011
9:55 am

I followed the instructions exactly, now when I open a AIR file, I get:
There is more than one definition of the AdobeAIR2_6 player. Only the first definition will be used.

I can’t image what went wrong

Oct 27, 2011
9:44 pm
#4 carl :

Hey Dave,

Thanks so much for posting this and taking the time to make it so clear. I’m still rocking CS5 but I’m sure this will come in handy when I upgrade. I find this whole process pretty intimidating! It’s kind of depressing that you have to jump through these sorts of hacks/hoops to get a very new program to export to the latest runtimes.

best,

Carl

Oct 30, 2011
1:14 am
#5 jokechen :

good gudiance,nice work.

thanks a lot!

Nov 3, 2011
2:34 pm
#6 Billy :

Thanks! I’ve been looking for how to do this.

Author Nov 6, 2011
8:45 pm
#7 swfgeek :

Hey Carl,

Yes is kinda of awkward that You hack Your way through just to get the latest versions of the runtime working. I still haven’t find a way to update the Flash Player that You use when testing “Command + Enter” hope Adobe give us a better/simpler solution soon.

Best,
Dave

Author Nov 6, 2011
9:01 pm
#8 swfgeek :

Billy, Jokechen,

Glad You found it useful. :)

Cheers,
Dave

Nov 19, 2011
1:50 pm

Thanks Dave, very useful comprehensive post, thanks a lot.

Nov 25, 2011
6:53 am

Heloo,
I have followed the your example but get message:
VerifyError: Error #1014: Class flash.display::Stage3D could not be found.
when I comment Stage3D text output is:
Hello Flash Player: WIN 11,1,102,58
Hello AIR Version No.: 3.1.0.4880

So it is suppose to work but it doesn’t.
Do you maby know why?

Dec 1, 2011
7:29 am
#11 Ali :

this is a great tutorial thanks. I’m using CS5 and am upgrading soon to 5.5, but i thought i’d give it a whirl anyway. Publishing to the browser works fine, but debugging with air give me the error “Debugger launch failed. Debug session will terminate.”

There are some differences with what you find in the flash app to your 5.5 instructions though perhaps there is a way round this. I have a AIK2.0 folder not an AIR2.6 folder. Also the descriptor-sample.xml file already has “http://ns.adobe.com/air/application/3.1″ in there on line 3, so i left it alone. Though it does seem odd that an update has put version 3.1 in there but not given me the option to use that version in the IDE

Jan 8, 2012
5:06 am
#12 Patrik :

SUPERTHANKS! Saved my morning.

Jan 26, 2012
4:49 pm
#13 adrian s :

I get same error as Stefan:

ReferenceError: Error #1065: Variable flash.display::Stage3D is not defined.

Jan 26, 2012
4:59 pm
#14 adrian s :

The current AIR sdk version is: ADOBE AIR SDK 3.1.0.4880

Does this mean I need to put “3.1.0.4880″ instead of “3.0″ descriptor sample.xml:

Because I still get the the Stage error, which means AIR 3 is not working yet.

Jan 28, 2012
8:04 am
#15 adrian s :

for AIR 3.1 I have tried changing swfversion=”14″ in the config xml’s, and now when running the app from Flash CS5.5, ADT keeps failling

Jan 28, 2012
8:11 am
#16 adrian s :

I meant ADL: “adl quit unexpectedly”

Trackbacks to this post.
Leave a Comment

Previous Post
«
Next Post
»
30 DAY DRAWING CHALLENGE - Day 2230 DAY DRAWING CHALLENGE - Day 2130 DAY DRAWING CHALLENGE - Day 2030 DAY DRAWING CHALLENGE - Day 1930 DAY DRAWING CHALLENGE - Day 1830 DAY DRAWING CHALLENGE - Day 1730 DAY DRAWING CHALLENGE - Day 1630 DAY DRAWING CHALLENGE - Day 1530 DAY DRAWING CHALLENGE - Day 14
Delighted Black designed by Zenverse