30 days of free Flex 2 online training from TotalTraining

September 20, 2007

A lot of people have blogged about this… but still I think this is really worth another mention. Total Training has come up with a 30 days of free Flex 2 online training on their website. This is very exciting for those programmers who are itching to give Flex a try, but are at loss of books and training materials.

Here’s what you should do…

  • Hit this link – www.totaltraining.com/guest/adobe
  • This will lead you to the Online Training Activation page. Note down the Activation Code in the “How to Redeem” section
  • Either sign in or register for an account
  • Enter your activation code, activate it and then proceed to training

NOTE : This training is valid only till Dec 31st 2007, so sign in as early as possible and also remember that this is a 30 day rial, so you have 30 days to complete your training…

I will be giving this training a spin myself, to see the way it is structured. Will provide comments as they come when I go through the trainings.

ToolTips for ComboBox Items or List Items

September 19, 2007

It is usually desired that tooltips be shown where extra information has to be displayed on mouse over. The problem here is to generate tooltips for List & ComboBox items.

Lets start with List

List has a showDatatips property that can be set to show the dataTips. You will then have to write a function to return the required string as the dataTip and assign it to the dataTipFunction property of the List…

With ComboBox, its a bit more complicated. The dropDown in a ComboBox, is by default a List, so if we can access the List and then set the above properties, we are done. For this you need to set a dropDownFactory for the ComboBox and then assign the factory object with the above properties that we discussed above for list. Here’s how

First define

private var myDropdownFactory:ClassFactory;

Call initApp() method on creationComplete

private function initApp():void{
myDropdownFactory = new ClassFactory(List);
myDropdownFactory.properties = {showDataTips:true, dataTipFunction:myDataTipFunction}

Then set this onto the ComboBox

<mx:ComboBox id=”myCB” dataProvider=”{myDP}” labelField=”name” dropdownFactory=”{myDropdownFactory}”/>

And the myDataTipFunction() looks something like this

private function myDataTipFunction(value:Object):String{
return (value.name+”‘s blog is “+value.blog);

It looks something like this 🙂

See the application and get the source code on the links below…

Application | Source

I initially thought this should be possible by setting the showDatatips and the dataTipField on the List, but it didn’t work as expected for me. I have logged a bug in the public bugbase

Adobe User Forum Migration

September 19, 2007

The Labs forums will be down for portions of Sunday, September 23rd and Monday, September 24th in order to migrate to the new Adobe forums framework. The forums.macromedia.com and adobeforums.com servers will be retired for English language content. Starting September 25, users should connect to the new forum.adobe.com server. For more details… check the link below

I’m a Flex Evangelist

September 17, 2007

My benevolent employers at Adobe have fulfilled my dream, and granted me the title of Technical Evangelist in the Flex Product line. I’m really thrilled to be taking up this position… To be part of a team that boasts of names like Ryan Stewart, Ted Patrick, James Ward and Duane Nickull is an honor in itself.

It seems like a long time back that I came into Macromedia and into the Flex team at the fag end of the Flex1.5 cycle. 2 years have gone and we are in the middle of Flex3. To have seen flex grow from a small enterprise product to a hugely popular RIA technology and then progressing onto the desktop with AIR and finally going open-source, has been really emotional journey. Now I start the second leg. But as Spidey says “With great power comes great responsibility!” 🙂

I’ll now be a part of the Tech Evangelism team based out of India which includes Prayank & Ramesh. But my work is not India specific and would love to hear from individuals and communities worldwide. I personally would like to see Flex taking over the world. The potential is really there… as we see by the statistics in India and elsewhere. There are a lot of really knowledgeable people out there, but they need to be brought onto a global platform to interact and innovate. And hopefully I can help.

So if you think you have any idea that can help chalk out that future, feel free to contact me on my personal email id. If you are running a Flex user community in your city or country itself, we would really like to know. Community has been the backbone of the success of all products at Adobe (and erstwhile Macromedia) and its concerns will surely remain as one of our primary concerns in the future too. Now with Flex going open source, I can really say,

Flex is a software of the people,
by the people, for the people !

Binding and Unbinding variables in AS3

September 17, 2007

I had earlier posted a blogpost on Binding in MXML & AS. And I received a comment from Judah Frangipane asking if you can unbind a variable in Flex. So here it is…

The trick is to capture the ChangeWatcher Object that get returned when you use BindingUtils.bindProperty() method. The ChangeWatcher object then has an unwatch() method that can be used to break the watch. If you bind in mxml using the curly brackets unfortunately, this does not work. You might have to break the binding altogether and not be able to turn it on and off.

Sample Application | Source Code

Update: Also read this post by Alex Uhlmann

Thanks Eric for pointing to this

Look Mom… An Apple!

September 13, 2007

These days I’m trying to get up to speed with AIR (Adobe Integrated Runtime). I have worked analyzing some of the AIR components from the Flex SDK side in the past but never got down to building a good app or even exploring the amazing features that AIR provides… My only meek effort was this 🙂

I was always curious to know how they made those AIR apps that looks like an iPhone or any of the other weired shapes. So I decided to start from there… I found a wonderful set of tutorials by Duane Nickull and ended up making an apple shape app using his tutorials. Here’s what I ended up with…

The background is just my desktop wallpaper 🙂

Registering FlexBuilder with serial numbers for multiple versions of SDK

September 12, 2007

With the advent of FlexBuilder3, Adobe has added a very cool ability to be able to access multiple SDKs and also switch between them. This feature would work for SDK versions of Flex2.0.1 onwards. But this has caused quite an interesting issue to surface. Read about it here…

In short, the problem is as below. I have installed FlexBuilder3 and when it opens up for the first time, I enter my license keys (for the builder as well as for charting). The builder by default, when it starts for the first time, uses Flex3-Moxie framework to compile the projects. I make a project with a chart in it and it compiles and the chart shows up without a watermark.

Now I go and change the SDK to Flex201 and recompile and run the app. But this time, I’m stumped to see that the chart appears with a watermark.

The solution though not apparent is a simple one. There are 2 ways to fix it…

1. Solution for Dummies

  1. Open FlexBuilder
  2. Right Click your Project and choose Properties
  3. Choose Flex Compiler -> Configure SDKs -> Choose Flex201 and press OK
  4. Make sure you have selected “use default sdk” option
  5. Restart FlexBuilder
  6. Choose Help -> Manage Flex Licenses and enter your chart license key again. Press OK. You might get an error at this point, but ignore it.
  7. Re-compile App (better to clean the project) and Enjoy !!!

2. Solution for Geeks (who want to know why it happened !)

The reason for this problem is that FlexBuilder uses a license.properties file found in the frameworks directory of the sdk. The sdk’s pre-configured in your FlexBuilder can be found at <FBInstallationDir>/sdks. So when you give the license key for the first time it writes to the license.properties file of the Flex3SDK and not on the Flex2.0.1 SDK. This is why switching the SDK causes the watermark to appear again.

So, another way of fixing this is to copy the license.properties file from Flex3SDK/frameworks directory to the Flex2.0.1 equivalent. And you are ready to develop in full-fledged versions of Flex2.0.1 and in Flex3.