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.


Flex Trends around the world…

September 4, 2007

A very special thanks to Mike Potter for bringing this to my notice. It is really exciting to see the trends analysis of adobe flex on Google Trends. Take a look…

Its really thrilling to see not only that India is on the top of the trends list, but also that Bangalore and Chennai tops the list of cities where the “flex” trend is really catching on… Wow, I didn’t know that Flex was so big a rage in India 🙂

I understand that any trend graph almost always kind of follows the below pattern and the above results are more of a validation of where the different countries are on the trend-graph rather than on the adoption of the trend itself. As the below graph suggests (Disclaimer: the graph is an illustration of a personal opinion and not based on any statistics), the adoption is already at a much higher state in the US than in India. This in turn, puts India on the list of countries where the adoption is low, but the adoption rate is higher than that in the US.

Since this adoption rate, rather than the adoption itself is the basis of Google trends, it is to be understood that the popularity of Flex might be much higher in US than in India. But its still great to see that India is keen to hop on to the flex bandwagon…


Indic Transliterator in Flex… powered by Google Labs

September 4, 2007

I saw this post on Abdul’s blog today. Google Indic Transliterator is cool. I played around with it a bit and then it stemmed a desire to do something similar in Flex. Thanks to the pointer by Abdul, I was able to achieve this.

Abdul, in his post talks of an URL (click on the link to see an example of what I’m talking about) which you can hit with your text through GET parameters and get it transliterated. The result, if tweaked a bit (i.e. removing unwanted characters including some escape characters) would yield a JSON.

Then I used the as3corelib to convert the JSON to an AS Object. I then embedded an Indic Font into my App and used it to render the text. The result is what you see below.

I’m not posting the code as of now because its still a very dirty 🙂 And also, the API is undocumented and may break soon. But I guess this should be pretty straight forward for anyone who wants to try this out…


Flex India is going great guns

September 3, 2007

Flex India is going great guns… Gone are the times when I, Mrinal & Abdul, among others were plotting how to get Flex to take off in India. It seems like ages back when we had the first Flex Developers meeting at Bangalore to brainstorm with John Koch, about the future of the Flex Community in India. Flex India today is not only up on its feet, but its ready for the race. Here are some stats that prove it…

FlexCoders is the grapewine for all Flex Community. Its a thriving group which has more than 7500 ( 7518 to be precise) people registered. This group has earned its reputation as a prime point where people can get their questions answered. Now lets compare it with the nascent group that is Flex-India.

Flex-India started off in July 2006 (while FlexCoders has been around from March 2004). It already has 430 people registered on it. This might look like a small number, but is sizable considering the fact that flexCoders is an international congregation of Flex developers, while Flex-India is regional. Just last month, we had more than 30 people joining the group, which is a very encouraging sight.

Another exciting factor is the traffic on flex-india. Take a look at the statistics below.

I tried to compare these monthly figures as a percentage of the corresponding traffic on flexcoders. This is what came out of it (I know i could have done these charts much better in Flex, but I just wanted to learn how to create charts in Excel 🙂 )

Click on the graph to see the full stats

I couldn’t believe that the average traffic on flex-india in the last 3 months has been around 20% as much as that on flexcoders. The fact that flexCoders is about 60 times the size of flex-india, just adds to the pride. I realize that these figurers are powered by the Services Companies in India and their clients abroad, but still the fact that the Flex Developer base in India is on a steady rise is a very heartening fact.

Additionally, it is personally gratifying to see that this rise began after March 2007, when we all got together and decided to do something about the Flex Community in India. Kudos to Mrinal who has been the cornerstone of community development in India from outside of Adobe. Being a flex developer himself for SAP, his passion for Flex matches that of any engineer on the Flex Team.

The flex developer community in India is getting stronger by the day. We now have active communities in Mumbai, Pune, Chennai and Bangalore and many more mushrooming by the day. Flex is Rocking India and India is Rocking Flex… This achievement is remarkable and I congratulate everyone who have been involved. Way to go 🙂