Six reasons to use ActionScript 3.0

August 22, 2008


I just went through the article by Lee Brimelow, he explaned the 6 reasons to use the ActionScript 3.0. He covered the reasons considering all the aspects right from the opportunities available in the market for the ActionScript 3.0 developers, speed of flash player 9 empowered by AVM2, display list, object oriented structure and last enjoyment of work in ActionScript 3.0, the one I really do J

Below are the reasons (you can find more details on his article):-

1. Your skills will be in high demand

2. Everything you build will be faster

3. There’s an abundance of new APIs

4. The display list rocks

5. The object-oriented structure is better

6. It’s more enjoyable to work with ActionScript 3.0

He had covered a bit of history of action script language (introduction and evolution), with answers to some AS 3.0 FAQs. Below is the link to the article

General Known Issues in Flash Player 9.0

August 19, 2008

General Known Issues in Flash Player 9.0

·        Flash Player cannot progressively load files that are greater than 2Gb

·        UILoader ignores scaleContent when content is loaded through loadBytes

·        Memory utilization could substantially increase when large numbers of bitmaps that are subject to mipmapping are loaded

·        Flash Player supports up to 30 frames per second playback for video.

·        Opera and Netscape do not allow recursive calls using the ExternalInterface API into the Flash Player. This issue has been reported to Opera and Netscape.

·        In certain browsers, full-screen does not render correctly when the window is split between two monitors where one monitor has a higher resolution than the other.

·        Socket connecting to port under 1024 throws ioError, not securityError

·        When using the Flex profiler, if FlashPlayerTrust is incorrectly created as a file, the Flex profiler will crash. Please ensure FlashPlayerTrust is properly configured as a directory.

·        On the Windows standalone Flash Player, empty POST actions are changed to GET.

·        Subsequent loads of ActionScript 2.0 SWFs containing components into a parent ActionScript 3.0 SWF may cause some components to break. The components will work on the first load, but loading new, or unloading ActionScript 2.0 components of the same class may exhibit this behavior.

·        Developers should not rely on garbage collection if immediate clean up of active objects, such as display objects, streams and media, is expected. Use the appropriate ActionScript 3.0 APIs (close, removeEvent Listener, etc.) to get immediate behavior when cleaning up active objects.

·        The delete operator is intended to remove properties of an object, and cannot be used to remove members of a class. For more details on the delete operator, see the ActionScript 3.0 Language Reference.

·        Flash Player sound input does not work for OSX Audio MIDI sample rate settings higher than 48Khz. The microphone will either record noise or nothing. Some third party applications and MIDI breakout boxes will change the systemwide Audio settings on launch, and fail to return settings to default on close. To workaround this issue, go to Applications-> Utilities-> Audio MIDI Setup. Select Sound Input and change the properties for the ‘Built-in Input’ and/or ‘Built-in Microphone’ to a setting less than or equal to 48Khz.

·        The standalone player cannot self-register SWF and FLV file associations under Vista without administrator privileges. Workaround: Users should launch SAFlashPlayer.exe once with administrator privileges by right-clicking on the EXE and selecting “Run as administrator” so it can correctly set the registry properties.

·        Bitmap effects and filters cannot be printed.

·        Button label text may not redraw correctly upon exiting full screen mode. User must mouse over the text to force the redraw.

·        Transform Matrix transformations are not reflected in respective MovieClip/DisplayObject properties. Properties like scaleX, scaleY, and rotation are not changed as the result of changes to a DisplayObject’s transformation matrix (flash.geom.Transform, flash.geom.Matrix). However, changes to those properties are reflected in the matrix. If you change a property after changing the matrix, the matrix also resets to its original value. Affects ActionScript 2.0 and ActionScript 3.0. Workaround: If using matrix transformations, avoid using scaleX, scaleY, and rotation in favor of their respective matrix transformations.

·        Triggering stage.invalidate() during a “render” event listener fails.

·        Empty strings passed through External Interface API via JavaScript are converted to null.

·        Some users are experiencing sound problems under Windows due to lack of support for WaveOut with drivers for some video cards, such as Realtek and SoundMax.

·        Launching the context menu when in full-screen mode may temporarily reduce FLV video playback performance on Macintosh systems.

·        Although full-screen mode does not support text input, the text input cursor will display over input text fields. Workaround: dynamically convert input fields to dynamic text fields or disable TextInput components when in full-screen mode.

PHP and FLEX communication

July 19, 2007

Communication between PHP and Flash using POST method of HTTPService service:-

Here I have created Flex project which passes two variables to PHP and get the sum back from PHP and displays the same in Flex. You need to send the variables in “name” “value” to PHP page as shown in code, same name value pair can be passed as Sum_HttpServ.send({num1:’3′,num2:’6′});

Below is the code written in Flex application:-

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”; layout=”absolute” creationComplete=”fnCreationComplete()”>
                <mx:HTTPService id=”Sum_HttpServ” url=”http://yourDomain/someFolder/GetSum.php&#8221; result=”fnDiplayResult(event)” fault=”fnHandleFault(event)”/>
                                import mx.controls.Alert;                               

                                private function fnCreationComplete():void{
                                                var Obj:Object=new Object();
                                private function fnHandleFault(event:FaultEvent):void{
                                     “Error ID=”+event.fault.errorID+”  faultString=”+event.fault.faultString);

                                private function fnDiplayResult(event:ResultEvent):void{

Below is the code written in the PHP “http://yourDomain/someFolder/GetSum.php&#8221; page which is placed on remote machine in virtual directory

print ($Number1+$Number2);

To use GET method, you need to change Sum_HttpServ.method=”POST”; in flex project and use $_GET[‘num1′] and $_GET[‘num2′] in PHP page.

Getting Multiple parameters from PHP:-
To return the multiple parameters from PHP you can return the variables separated by ampersand (&) if you are using flashvars as resultFormat. There are fore more formats namely “text”, “array”, “xml”, “e4x” you can use anyone as per your need but depending on that you will have to format your response object in PHP.  Here I am using flashvars as result format.

Below is the PHP code that returns addition & multiplication of variable.

print “Addition=$Addition&Multiplication=$Multiplication”;

And now you are ready to send the variables from PHP. Now in flex application, your fnDiplayResult() function will change to

private function fnDiplayResult(event:ResultEvent):void{
                      “Addition = “+event.result.Addition);
                      “Multiplication = “+event.result.Multiplication);

And add line Sum_HttpServ.resultFormat=”flashvars”; in fnCreationComplete() function before you send the parameters to PHP.

Adobe Live docs

July 17, 2007

Vary useful flex 2 live docs by Adobe on the path below

You will find here docs about :-
Getting Started with Flex 2It contains an overview of the Flex Product family and series of tutorials
Flex 2 Developer’s GuideIt covers all the components their default values & how to use them with source. It also covers using events, creating custom events, using style & themes, skinning the components, shared objects, history management and many more things. This guide is useful when you are new to flex and creating your application in flex.
Building and Deploying Flex 2 ApplicationsThis covers process of building & deploying your application right from development directory structure, Flex 2 SDK and Flex Data Services Configuration, Using the Command-Line Debugger and using Runtime Shared Libraries.
Creating and Extending Flex 2 ComponentsIt covers creating simple as well as advance components using MXML and using ActionScript, creating custom Formatters & validators
Programming ActionScript 3.0It covers introduction to AS 3, display programming, player API overview, event handling, networking & communication and using external API.
Using Flex Builder 2It has details about using flex editor details & using flex.
Flex 2 Language ReferenceIt covers all the packages, Interfaces, classes of Flex 2.0. It also provides all the details of the class right from public methods, public properties, events and some details about each.
Flex Data Services 2 Java ReferenceIt covers details about flex data, management, and messaging packages. Classes nad packages inside these them with details of each class and their members  

You can download the PDFs of below docs to use offline

Getting Started with Flex 2
Flex 2 Developer’s Guide
Building and Deploying Flex 2 Applications
Creating and Extending Flex 2 Components
Programming ActionScript 3.0

Adobe and Microsoft

July 10, 2007

Here is the link for the post of Ryan Stewart which may help you to decide what to use when depending up on your needs. I am still new to Flex, AIR and don’t know much about the Silverlight and WPF, so I won’t comment on it. I am currently working on a project in Flex & I am enjoying the working in Flex.

Link for the post :-

This post gives you idea about things, when you:-
 Ø Want to build rich desktop applications.
 Ø Want to build rich browser-based applications.
 Ø Want to make your web application more interactive.
 Ø Want to produce and consume video on the web.
Want tools that allow me to create rich experiences.

Adobe Bug and Issue Management System

July 4, 2007


Check out the below link for Adobe Bug and Issue Management System

You can see the projects grouped by the category as:-

Ø     ActionScript Compiler
Ø      Flex Builder
Ø      Flex Data Visualization Components
Ø      Flex Enterprise and Test Automation Components
Ø      Flex SDK

Issues are logged to particular component, classes, functions, states, events etc. with their status. With above listed categories you can go in the details of the issues like the version it is happened for, its severity, steps to reproduce it, in some cases steps to fix it or the work around for the problem & many more. You can also check the attachments (if there are any) with the details of particular issues to get the more idea about the same.

This issue management system gives you facility to search issues on number of constrains. If you have a login you can report the bug, task or enhancement for particular category in system with all the details.

AS 3.0 resources

July 2, 2007

Must visit the site:-

A site were you can find out many AS 3.0 resources like

Ø      ActionScript 3.0 documentation
Ø      ActionScript 3.0 Sockets examples
Ø      ActionScript 3.0 Misc examples
Ø      ActionScript 3.0 – 3D
Ø      ActionScript 3.0 Sound
Ø      ActionScript 3.0 Text
Ø      ActionScript 3.0 Webcam
Ø      ActionScript 3.0 Tutorials
Ø      ActionScript 3.0 Performance examples
Ø      Other ActionScript 3.0 Collections