Welcome!

Anatole Tartakovsky

Subscribe to Anatole Tartakovsky: eMailAlertsEmail Alerts
Get Anatole Tartakovsky via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Article

Extending Adobe Flex with Flash

Knowledge of Flash internals helps in Flex development

From Farata Systems blog:

While a large Flex application is loaded, the user may experience unpleasant delays, which can be used productively to logon to this application. Besides, it'll give the user perception that your application loads faster. 

I recently had a chance to use Ted Patrick's (Adobe) sample  to mitigate the load time of the application. While Ted is displaying a splash screen while the application is loaded and initialized in the background, I wanted to use a very dull logon window to keep the user occupied with a bit more useful stuff. Here are 3 challenges you would face with that task:

1. The logon screen has to be very lightweight - under 10K - so it may not be based on the Flex framework

2. The application may not remove logon window on load as the user has to login first.

3. If the user completes his/her login but the application did not finish its load, the standard progress bar has to appear.

Confronted with all these problems I timidly thought of writing a small HTML/JavaScript dialog and calling it from Flex, but overcame those thoughts and did the only right thing to do - called for help from Konstantin -  our  Flex AND Flash developer, and he has created  LightweightPreloader.zip

Inside of this zip file you'll find  a simple login window with a typical  user and password fields over a plain screen that sends the  login info to the server and expects some XML back. It also includes Ant  build files and  support classes. After you are done deploying you should get a small (<6K) SWF login window (4K accounts for buttons and the window background, the rest is actual code).

The lesson learned: there is a large class of tasks that can only be solved using native Flash APIs and coding techniques. In the last year I came across at least 6 cases when the native Flash code was the only reasonable way to go. I believe it is time for Flex and Flash developers to start working on common shared libraries covering the "non-visual" domain.

For additional info on what's happening while the Flex application is being loaded, refer to this article.

More Stories By Anatole Tartakovsky

Anatole Tartakovsky is a Managing Principal of Farata Systems. He's responsible for creation of frameworks and reusable components. Anatole authored number of books and articles on AJAX, XML, Internet and client-server technologies. He holds an MS in mathematics. You can reach him at atartakovsky@faratasystems.com

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.