Archive for the ‘Flex’ Category

h1

Flex 3 Certification Guide

December 24, 2008

I successfully passed the Flex 3 with AIR certification on 8th November 2008. If you notice the date on which this post is blogged, its almost a month and a half later. Well, that shows my laziness to blog! Anyways I wanted to blog this experience particularly as I am very sure that it will help many of the Flex developers who aspire to become certified for Flex 3.

What will you find in this post: In this post, you will find the steps you could follow to get prepared for Flex 3 certification. You will also find reference materials that you may use for studying

What you will NOT find: You will NOT find any questions that I got in the certification exam. You will NOT find clues, hints, tips, secrets to clear the exam. You must know that there are no shortcuts to success.

Where should you start: Well, if you are preparing for the exam, first read Anand Vardhan’s blog on getting certified for Flex 2. Don’t think that he had written it for Flex 2 and you are preparing for Flex 3 certification. The most important learnings from the post are still very much valid. Taking forward from where Anand had left…

What’s different in Flex 3 (as compared to Flex 2 certification): One big difference in the two certifications is the inclusion of Adobe AIR. There are around 10 questions on AIR. Other than that, all that has changed in Flex and its SDK from 2.0 to 3.0 are different.

Tips for Preparation: The best way to learn something in and out is to do a full project on it. Same applies for Flex 3/AIR as well. If you want to learn it, do some project on it. Create some kind of an application that uses the full power of Flex and AIR. This way you can understand the nitty-gritties and complexities of the tool. Apart from this, read any book on Flex 3 like Programming Flex 3, Learning Flex 3, and Flex 3 Cookbook. And also read ActionScript 3.0 Design Patterns. Apart from these, there are tons of other reading material on the Internet like blogs, discussion forums, devnet etc which will help you enhance your knowledge. Also visit Adobe’s official site for Flex 3 certification.

How easy or difficult is it: This is something that depends on the skillset of the person attempting the exam. Adobe has set a very “achievable” passing percentage of 67%. But at the same time, the getting all the questions correct will not be a cakewalk. From my experience, what I found was that I could answer almost 50% of the questions because I had practically faced the scenario sometime or the other. So it really helps if you have hands-on knowledge on Flex 3. This doesn’t mean that people who have not worked on live projects will not be able to answer the questions. But its just that it makes the life easier for those who have used Flex in the day-to-day life!

The Last Word: I would like to wish all aspirant Adobe Certified Experts for Flex 3 with AIR a very whole hearted BEST OF LUCK. Prepare well and come out with flying colors. Please feel free to ask me anything about the certification and I will update this post itself with the answers.

h1

Custom Right-Click ContextMenu in Flex

December 12, 2008

Ever wanted to get rid of the typical context menu that you get when you right click anywhere in Flash Player? Well Flex API does not provide any feature to stop this. However some genius mind created a hack to not let the Flash Player know that the right click has happened. Instead, just call a Flex method using ExternalInterface. And in this method, create the menu (or do whatever else you want).

Run Demo

Download Demo/Source
Download Mirror 1
Download Mirror 2

P.S: All credits to custom-context-menu creators for developing the functionality!

h1

Space Between Tabs

November 30, 2008

Someone in Chennai FUG asked if it is possible to space out tabs. The first thing that came into my mind was a big NO. But later as an after-thought, I got this idea as a workaround solution.

Run Demo
Download Source

h1

DateField as ItemRenderer

November 30, 2008

If you try to put the dateField as itemRenderer for a DataGridColumn directly using mx.controls.DateField, the chances of getting a runtime error is very high. In fact 9 out of 10 times, you will end up getting an error saying that it is unable to convert string to date. Here is a solution to that.

Run Demo
Download Source

h1

Loading Animated GIF in Flex

September 30, 2008

Loading Animated GIF in Flex is something that has always been the most wanted thing for Flex Developers. Doug McCune has made a component, Animated GIF Loader which actually loads animated gif. But the only drawback is that it costs $50!

Here is a free solution. There is a free component AS3GIF. The example shown with the code was made in Flash CS3. I ported it for Flex. Here is a sample…

Run Demo
Download Source | [Google Pages Mirror Link] | [Freehostia Mirror Link]

***
P.S: As many of you have reported that the 10gbfreehost link doesn’t seem to work, I have added a few other mirrors where I have uploaded the source zip file. One of them should definitely work!

h1

Flex 3 for Dummies

August 10, 2008

The book is out.. and I hope that it is as good as any other book of the Dummies series! Its available at Amazon for $19.79…

Visit Amazon

h1

Two Input Boxes in DataGrid’s ItemEditor

August 10, 2008

Alex has created a wonderful workaround in scenarios where you will need two or more input boxes in a single itemEditor in a DataGrid. Have a look:

See it on Alex’s Blog

Thanks Alex!

h1

DataGrid Showing Date Difference in ToolTip

July 13, 2008

Again a request from Flex India group, I created a DataGrid which has two columns showing dates. And the tooltip for these colums show the difference between the dates in days as a ToolTip.

Run Demo
Download Source

h1

Column Chart with XML

June 10, 2008

Yesterday at Flex India asked how to read an XML and prepare a ColumnChart from it. I wanted to tell that guy how to do it, but I was feeling so lazy that I just gave him the complete code. Here is the application:

Run Demo
Download Source

h1

Cross Domain Woes

May 3, 2008

Cross domain has been something that has been nagging the developer fraternity since time eternity. The first time I heard about this term – cross domain was way back during my early days in e-learning. We were making simple e-learning courses and our client got over ambitious and wanted to use clustered servers to host the courses. They wanted the courses to reside on a different server and the Learning Management System (LMS) to be on a different server. And the best thing was that he did not even tell us before he did this.

What happened was an expectant collapse. The courses ran fine but did not track any data in the LMS. And since we did not have any clue about what the client did and even otherwise, atleast I did not have any clue what cross-domain policies are, we were all in deep trouble! Then after doing a lot of research and thankfully a timely information from the client that they had hosted the course on a different server as the LMS, it helped us zero in on this issue.
The reason I wrote this blog today is because it has been almost 4 years for the above mentioned incident to have occurred. And today after these four years, cross domain issue has haunted me again. I was making my website in Flex and till the time I was publishing the project locally, everything was working like a charm. And the moment I hosted it on the net, a few of the sections started breaking. There was an RSS feed on the home page from my blog, and then there was a complete section for Blog and Photos (from Picasa) and both these sections collapsed.

I am disappointed now that I did not realize this when I was designing my website and was finalizing on its contents. Now I am looking for some alternate solutions like a web service that can route the data to my website.

I seriously hope I get something :(