1st Bangalore FUG Meeting – See ya there :)

May 31, 2007

The revolution finally begins… the wheels are ready to roll…

I’m glad to announce that the 1st Bangalore Flex User Group (FUG) Meeting is gonna take place tomorrow, 1st June 2007. Here are the details.

Date : 1st June 2007 (Friday)
Time : 4 pm – 5 pm
Venue: Aztecsoft,
2nd Floor Salarpuria Infinity,
#5 Bannerghatta Road
(Near Dairy circle, next to the Huge Accenture Building)

Agenda: Since this a first meeting this will be more of hanging out and setting agenda for future meetings 🙂

I’m really excited in meeting the Flex users in Bangalore. I know some of them and looking forward to getting to know more people. Anyone who wants to know about Flex is also more than invited to join us.

If you are coming… Click here and reply on the thread

See ya guys there…

My New Abode at Adobe

May 30, 2007

Start of a new chapter. I moved offices.

No… I haven’t quit Adobe, its just that our prior office was so crammed up, they shifted some people down to first floor (from the 3rd floor).

I,m just enjoying the new decor and the fact that I have a cube bigger than what I ever had 🙂 Yes… My new “Abode at Adobe”. Here are some pics.



Enter the Magical World 🙂


Raghu @ Adobe


My New Abode at Adobe


Flexing My Muscles Still


Powered by ScribeFire.

Happenings in the Flex World

May 29, 2007

I’ve been off blogging a bit. So here’s some news on what’s happening in the Flex World.

I have been reading a lot of Blogs lately (rather than writing stuff) and came across some interesting pieces of information. ThoughtI’ll collate them for the benifit of those who missed it.

1) Vista Blue Theme on ScaleNine

Juan’s site has an awesome Vista Blue CSS for your Flex Apps. Very nice indeed. What’s more exciting is that its done by an Indian – Bhavin Padhiyar. What impresses me most is the DateChooser and DateField. I dont like the ComboBox muxh and think that the TextInput looks like a button (But, who am I to comment when I cant do even a fraction of what he has done 😀 … Way to go BP).

You can experience it & Download it

One of the best things is that he gives you a Photoshop file where you can customize your assets… Nice

2) Animated GIF Loader by Doug

This is something I always wanted. SWFLoader/Image control has a drawback of not supporting animated GIFs (a workaround is to have the animated GIF inside a SWF and embed the SWF itself). Its great to see Doug come out with this. But it’s a commercial component (for a meger $50). This one’s surely for the FlexBox… Are you listening Mrinal?? 😉

3) [The Big One] Ryan Stewart is working for Adobe now

Anyone (well almost…) in the RIA Arena would have heard of/read the ZDNet Blog by Ryan Stewart. He’s very well known in the RIA domain and is now gonna work for Adobe… Ryan is joining as a Rich Internet Application Evangelist on the Platform Team. Welcome Ryan… we are looking forward to working with you 🙂 But, this notwithstanding, I sincerely hope he continues his unbiased evaluations of different technologies… may it be Flex, Flash, Ajax or Apollo

That’s all for now 🙂

FLEX APAC Tech Wednesday e-Seminars

May 16, 2007

Well, it has been a long wait… From the time when John Koch was here in March, the talk of having an Adobe “backed” Flex Community in Asia has been doing rounds. We have quite an enthusiastic community in South Korea and Japan and smaller ones in countries like China & India.

We in India have taken a giant step by launching Flex Communities in Chennai & Bangalore (the two premiere IT destinations in the country). Read more about this on Mrinal’s Blog

But our vision is to grow the communities in APAC and also bring them together on a platform, where they can interact and share knowledge. We at Adobe are commited to make this happen.

In in conjunction with this, we at the Flex Team in Bangalore (especially Prayank Swaroop, our Flex Evangelist) have kick started a series called the “Adobe Flex APAC Online Tech Seminars“, which is essentially a mirror of a similar initiative in the US called “Tech Wednesdays“.

This week was the first edition of the series, where we had Prayank talk about FlexUnit (an equivalent of JUnit in Flex). He also did a demonstration on how to write these tests and execute them on FlexBuilder.

There were 21 participants and for a first time venture, I count it to be quite a success… For those who missed the event, you can see the recording of the session by clicking the link below.

Testing Using FlexUnit by Prayank Swaroop

Though Prayank keeps re-iterating that this was a test run, I thought it was a trial only in the sense that there were some audio issues in setting up the meeting. So i suggest people to skip the first 10 minutes or so of the recording as this is all about the initial setup of the meeting.

We plan this to be a weekly/bi-weekly affair and the timings are around 4 p.m. IST(Indian Standard Time). This timing is to facilitate people from the Pacific Rim (namely Japan, Korea, Singapore…etc) to join in with us at a time that is not too late for them.

Do send the comments on this session and also, any suggestions on what you would like to see in the upcoming sessions. You can also volunteer to host some sessions yourself. Drop me or Prayank a mail and we’ll get back to you.

Go FLEX !!!

Addendum (May 17th) – Prayank just posted the presentation and the source files on his blog. You can download them by clicking on this link…

What happens if I drag & drop an ArrayCollection item and a XMLList item into a List ?

May 8, 2007

A pretty interesting question. When Rajesh Bhadra posed this question to me, I thought I should write about this. The answer is pretty straight-forward (though may not be obvious). You’ll have to handle the data type before you add/ render/ manipulate the data. i.e, your itemRenderer code will look like this

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Canvas xmlns:mx=”http://www.adobe.com/2006/mxml&#8221; width=”100″ height=”20″>
[Bindable]public var txt:String = “”;
override public function set data(value:Object):void{
super.data = value;
txt = (value is XML)? value.@name : value.name;
<mx:Label id=”lbl” text=”{txt}”/>

So, in short, the check looks like…

if(value is XML) {return value.@name}
else {return value.name}

or, converted to a ternary operator

return((value is XML)? value.@name : value.name);

A similar inspection is also needed on the selected object to extract info (as in the inspectSelection() method in code).

The application below, contains a List (with an XMLList dataProvider and a labelFunction) and a TileList (with an ArrayCollection dataProvider and an itemRenderer). The third control is a HorizontalList with the itemRenderer code that i mentioned earlier.

You can drag & drop from the List & Tile to the HList without data loss… that’s the idea. For details…

P.S. This application has been constructed from the skeleton of a code-snippet that was given to me by Rajesh Bhadra

PageDown, PageUp seek in VideoDisplay

May 8, 2007

I read somewhere that it would be cool to have the Flex VideoDisplay do a forward & reverse seek when the user presses PageDown and PageUp keys respectively. I just tried it and it was simple to get this to work, but not without learning something new 🙂

I first put an addEventListener on application complete on the VideoDisplay…

vd.addEventListener(KeyboardEvent.KEY_DOWN, kbListener);

But it didnt work.

The problem is that inherently, no containers by itself is focusEnabled in Flex. So the listener on Video doesn’t work as there is no focus on it (even with focusEnabled property set to true).

I worked around it by putting the listener on the application. Though the application is also a container, focusing on any of its children (that are focusEnabled, like Button, TextInput… etc) bubbles the keyboard event to the application and eventually triggers the listener. So when I altered my applicationComplete code to

this.addEventListener(KeyboardEvent.KEY_DOWN, kbListener);

it trigerred the listener that checks for the pageUp, pageDown keys and calls for the updation of the playheadTime property on VideoDisplay.

private function kbListener(event:KeyboardEvent):void{
var num:Number = Number(ti.text);
if(event.keyCode == Keyboard.PAGE_DOWN){
else if(event.keyCode == Keyboard.PAGE_UP){

private function movePlayhead(num:Number):void{
if(vd.playheadTime+num >0){vd.playheadTime += num;}

This works… but its not a perfect solution. The problem here is that even if the pageUp & down are intended for some other purpose in the application (like for an Accordion), still the video will skip forward.

Finally thanks to Srini, i found a solution. The trick is to make VideoDisplay focusable, which is achieved by implementing the IFocusManagerComponent Interface by extending the VideoDisplay Class. So I have MyVideoDisplay which looks like this

import mx.controls.VideoDisplay;
import mx.managers.IFocusManagerComponent;
public class MyVideoDisplay extends VideoDisplay implements IFocusManagerComponent


And then use

<MyVideoDisplay width=”400″ height=”300″ id=”vd” source=”video1.flv” />

instead of

<mx:VideoDisplay width=”400″ height=”300″ id=”vd” source=”video1.flv” />

and revert to applying the eventListener on the VideoDisplay and Hola… Everything falls in place…

Now only if you click on the Video and then press pageDown/Up does it work. Also, now the Video appears in the tab loop of the application too. The code & app is here