Security in Flex – Demystified !

October 12, 2007

This is for people who are searching for places to get information on FlashPlayer/AIR Security and for guidelines on creating secure applications.

  1. This link will provide you an overview of Flash Player Security with details on the Flash Player APIs for the same
  2. This link talks of AIR Security and of the additional sandboxes in AIR and how to work with them
  3. A really informative presentation done by Deneb Meketa at MAX2007
  4. Lucas Adamski’s Blog – State of Security

The above links should give you a good idea about security with AIR & Flex and how to create applications that leverage them.

The Architecture of Flash from the horse’s mouth

April 26, 2007

A continuation from the last post, this is again from PodTech. Here Ely Greenfield (Flex Architect), David Wadhwani (Vice President of Flex Product Line), and Mike Chambers (Senior Product Manager, Developer Relations), gives us an inside on Flash’s architecture and gives further details about what is being open sourced.

[podtech content=]

(or you can download it here)

Error on adding FullScreenListener in creationComplete handler

March 6, 2007

This is an issue i hit upon while i was doing the Full Screen App (you can see it here). I wanted to add a listener to listen for the FullScreenEvent (package in my Application. So i put that onto my creationComplete handler on the Application, i.e.

mx:Application xmlns:mx=”” width=”100%” height=”100%” creationComplete=”initStuff()”


private function initStuff():void{
stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreen);

But, this threw a real time error (RTE) saying…

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at JustFullScreen/::initStuff()
at JustFullScreen/_Application1_creationComplete()

The above error means that the “stage” object is null when it is trying to set the listener. What perplexes me is that if i put this addListener code in a later part of the application, it works. Which means that the stage is getting intitialized between the Application’s creationComplete and the place in the code where i’m calling it. Is this a bug or does the stage get initialized later, dispatching a different event? I’m still digging.

Addendum (half hour later): I observed now that including the SystemManager class (mx.managers.SystemManager) and then using the following code in the creationComplete handler works.

import mx.managers.SystemManager;

private function initStuff():void{
FullScreenEvent.FULL_SCREEN, handleFullScreen);

So why is the systemManager object required if it is in the creationComplete handler and not if it is in a later part of the code… I’m confused now!!! Gotta tread back to the Flex Gurus :)
The code is here…

Addendum again (the next day)Thanks Joan for the info. Thanks to her, i found the solution for the above problem…

It seems that the stage is available only after the updateComplete or applicationComplete Events. Read the post that demystified things for me…

My Full Screen Video App – Ver 1.0

March 6, 2007

I wrote about full screen support in flash, a long time back in Nov ’06 (see that post here). I have been planning to write one myself. So finally i got myself down to write it. Before i put you through the app, some details on the API.

To make your application have a fullscreen support you need to do the following things.

1) Have the latest Flash Player (get it here)

2) Use the new Full Screen API
import flash.display.StageDisplayState into your Application and set the displayState of the stage. I have the following function toggling the FullScreen feature. “fsChk” is a CheckBox, based on which I’m toggling the functionality

private function toggleFullScreen():void{

stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreen);

if(fsChk.selected) {
stage.displayState = StageDisplayState.FULL_SCREEN}
else {
stage.displayState = StageDisplayState.NORMAL}


3) Update the html-template in which you have the flash App

In the object & embed parts of the html code of the page in which the flash app is inserted, you need to add a new parameter allowFullScreen to true. You can refer the source of the app and view the html for details.

If you want to know more about this feature, refer the Adobe DevCenter article on the same or view the PDF that i have created, collating all that information.

Now the Application. This is just a small video player which can go full screen by checking a Flex CheckBox. This is written in Flex2.0 and you can find all the source files here

Click here to view the Application
(confirm that you have the latest Flash player)

P.S – I have muted the video to start with, un-mute it if it pleases you :)

Update March 07 2008: A lot of people have complained that they got a security error when they tried using the code above. Here is a post articulating the problem and the solution.

Flash Player 9 – Your window to richer experiences

June 27, 2006

Adobe has rolled out Flash Player 9 for the public. Get it today, so that you do not fall behind in the search for richer experiences on the net.

For technical guys, Flash Player 9 has a whole new architecture with ActionScript3.0 (AS3 for short) forming the core of it. AS3 is more tightly bound OOP language than AS2, adhering to the ECMAScript standards (which is followed by JavaScript too).

For now, only FLEX2 will come out with AS3 content, though all legacy files would run fine on Player 9. Designers will have to wait a while (until next Creative Suite release i guess) to get an Authoring equivalent in AS3 (in conjunction with the Flash Authoring 9 release)

So get it today and dont fall behind… Here’s the link

P.S. I will be uploading some cool stuff i did with AS3 & FLEX, so i suggest you get it :)

Enriched with Flash MP3 Player

June 20, 2006

I was visiting Hemanth’s Blog when I saw that he had a site of his own now, dedicated to his musical musings (you can check it out here). I was mighty impressed by the custom Flash Player which was used to play the playlist of his songs… I longed to make a similar one, but knew my flash skills was not as good (I can make one in Flex easily, but Flash player 9 that Flex2 uses is not yet fully public)

But then, something in the right click menu caught my eye.. it said “FLASH MP3 PLAYER 2.0 by JEROENWIJERING”. I went to Jeroen’s site and downloaded the latest version of his player there…

The best part about it is that it is under the “Creative Commons Deed” so I can edit it and use it for my non-commercial purposes, by giving due credit to the creator. So here’s to Jeroen, for creating a simple but wonderfully useful application. Cheers!!

Now you can listen to all my songs in the sidebar to the right of the blog, rather than having to navigate to each post for the songs. Flash Rocks, so does Macromedia (now Adobe), who created it…. Yeee ha

FLEXing my Muscle

March 1, 2006

The whole point of this blog is to write about my passion for programming, for Flash, Action script & Flex. So here we go…


Get every new post delivered to your Inbox.