Tuesday, March 27, 2007

Bye Bye Blogspot

I'm moving 2 of my blogs (my personal one and my tech one) to wordpress... Bye Bye Blogspot

But my musical blog and my crazy one will still remain here...
The new ones are at...
  1. My personal blog - http://walkoflife.wordpress.com/
  2. My Tech blog - http://raghuonflex.wordpress.com/

Another great news... I've registered my own domain... You can get to all my sites now at

Sunday, March 25, 2007

Flex In India

Hi All,

I have added a "Flex In India" tab on my blog sidebar... All you Indian FLEX developers out there, drop me a mail @ rrao at adobe dot com, and i'll add your blog here...

Thanks

Innofest Web2.0 Workshop

I have been taking "Web2.0 & RIA" course at International Institute of Information Technology, Bangalore (or IIITB for short) for sometime now, with Ram and Praveen among others. Its been a quite wonderful experience for me to actually impress upon an audience what FLEX is all about.

Recently,they approached us to do a Web2.0 workshop for their techfest called Innofest07 (by the way, their website is made in Flex, quite a commendable work). So me and Ram went there this Friday to do the workshop whose theme was Web2.0, FLEX & Mashups.

Ram started off with the intro about what Web2.0 is and about the basics of Flex. Then it was my turn. I was a bit sceptical to begin with, as almost all the people who attended the workshop had never used FLEX or even heard about it. But we set sail... I did a live code mashup of a FLEX App pulling photos from Yahoo Photos! using their REST service.

To my delight, the audience not only enjoyed it, but also took part in a small code jam afterward, where they extended the application to include Yahoo Travel Search! It was amazing that they could actually build a Mashup using two web services (they probably hadn't heard about) and using a technology that they had never used, in a span of just 2 hours... really, FLEX rocks! And what's more the guys with the best app went home with a free FlexBuilder licence

I have uploaded the files from the workshop, you can see them at the links below.
  1. Yahoo Photo Search using REST in XML format (what I did at the workshop)
  2. Yahoo Photo Search using REST in JSON format ( JSON has caught my fancy these days)
  3. The source (you can right click and do a view source on the above apps too)
  4. Some extras - the CSS, the JSON parser library & assets (in the above link itself)
Some acknowledgements to be made here...

Sunday, March 11, 2007

An afternoon with John & fellow Bangalore Flex Developers

John Koch is the Developer Relations Manager for India for Adobe products like FLEX, ColdFusion, Flash Mobile ...etc. Thanks to Abdul (for making this day possible) and Mrinal (for booking the place and getting people together).

I was surprised to see that there are so many people already doing FLEX development in Bangalore. There's Adobe (obviously), SAP, Mogulus, SunGard and bunch of free lancers and flash guys who recently picked up FLEX.

We had a nice chat about what can be done for the FLEX community in India and also some of their pain points with FLEX too...

As Mrinal puts it, "Thus the seeds for the Bangalore Flex community has been sown". We need to nurture this to make it a success. Keep watching flex-india.org for updates.

From L-R : Mrinal, John Koch, Abdul,
The Mogulus guys (Mark & Phil) and Me

Also read Abdul's and Mrinal's blog posts about the same...
For some reason, this post was in my drafts, just saw it today...
Says a lot about my "active blogging". I should be more careful...

Saturday, March 10, 2007

JSON - A lightweight way of passing Data

I was at the Web2.0 Conference held by the Computer Society of India Bangalore Chapter (CSIBC) at Royal Orchid in Bangalore. There was Philip from Yahoo Bangalore talking on JSON.

JSON
(JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. The advantage of JSON is that its very light-weight and has none of the markup problems associated with the XML Interchange. Its fast evolving as a preferred data-interchange format, majorly being pushed by Yahoo. Its really worth taking a look at. Yahoo is giving a lot of its Services which were traditionally XML based now in JSON & serialized PHP as well. Here are some links that will let you deep-dive in JSON.
I was really excited with JSON and started some primary explorations with it. It turned up an AS3 Core Lib, which includes a JSON parser for AS3 (i.e FLEX). I will put up a Yahoo Photo Search soon with JSON and using the AS3-JSON Parser

Calling all Flex Enthusiasts in Bangalore

Calling all Flex Enthusiasts in Bangalore.

John Koch (Adobe Developer Relation Manager, Asia) is going to be in Bangalore on Sunday (March 11, 2007) from 11.30 to 1.30 at the Casa Del Sol, Devata Plaza, Residency Road, Bangalore. Click here to view the whole details...

Be there if you want to be in the exciting space of FLEX Bangalore.

Friday, March 9, 2007

ThreeStateCheckBox... Bundled

I have bundled the 3 state checkbox now as a SWC (Shockwave Component). Also have done some changes to the component.You can download the SWC here and also view the source here
  1. Changed the cross property to crossed
  2. As per an anonymous' comment, you cannot now set both crossed & selected properties on the component.
I have made a example to illustrate the above.






One thing to remember while using the SWC... You need to have the following namespace in the Application tag.
xmlns="http://www.raghunathrao.com"


You can view the source of the example here

The ominipresent Flickr Viewer

This is one of the most ominipresent FLEX apps of all, the Flickr Viewer, the grandDad of all Flex Mashups. Here's one on the Adobe Showcase. There are so many of them that people are sick of it (read this).

I did my own version of Flickr Viewer when i was doing a FLEX Workshop at Manipal in MIT. This was as a part of my alma mater's technical fest TechTatva '06. I thought I'll put it up.

My Flickr Viewer
Everyone seems to be having one :)

This app uses Juan's MAC OSX Theme. There are some known issues (I'll try to sort them out as i get time)
  • It only gives you the first page of results
  • There's a bug in the drag and drop functionality into the image when run remotely. Funny enough it works fine on the local system.

Thursday, March 8, 2007

My version of 3 State CheckBox

I was just looking at the compoenets on Mrinal's FlexBox when I came across the 3 state checkbox by Alessandro Crugnola. It seemed a useful thing but what struck me was a bit different. This can be extended to a checkbox that can be used for a "Yes/No/Dont Know" Scenario, rather than having the initial state blank. So i edited Alessandro's code and chnaged it to have 3 states. The 3 states are decided on the status of 2 flags - selected & cross
  • State 1- Undecided State (default) - selected & cross = false
  • State 2 - Crossed State - selected=false, cross=true - Shows the "NO" state
  • State 3 - Checked State - selected=true - Shows "YES" State
I know it could have been made better, but i just spent some 3 hrs on the component + the application below. Use the below Application to vote for my component. You can use the "View Source" to view and download the source of the application and the component.





Let me know what you think

I have observed that the View Source on the blogger page does not work. So go to the application and see the source

Wednesday, March 7, 2007

Juan's collection of awesome Themes

All of you looking to make cool Flex apps, especially those eyeing the "Adobe Developer Olympiad" in India, take a look at the cool themes on Juan Sanchez's Blog. My favourites are as follows

  1. Obsidian
  2. Mac OS X
  3. Napkin Skin
  4. Shadow
  5. Messenger
Download them here...

flexcursion - calling all FLEX enthusiasts

I just joined flexcursion.ning.com. It is a social network created by Juan Sanchez. Its motto is...

Meet fellow Flex 2 developers, check out some screen shots of other Flex 2 apps, get feedback on your Flex 2 projects and much more.

Be sure to tell other Flex enthusiasts.


I saw some big names in the FLEX Arena here, including Abdul Qabiz, Tariq Ahmed and Ted Patrick. Check it out...

Tuesday, March 6, 2007

Me on MXNA's "Most Popular Posts in the Last Month" list

A couple of years back, if someone told me I would be working for Macromedia, I would have had a good laugh. Now 2 years down the line... I'm not only in Macromedia (now Adobe) but also working on this awesome technology called FLEX.

MXNA is Adobe's (MXNA was started by Macromedia) news aggregator on its technologies. I was really surprised to see a post of mine, 5th on the most popular list of last month's Flex Blog posts.

I felt like i was floating...


Click on the image to see a bigger image or go here

Error on adding FullScreenListener in creationComplete handler

This is an issue i hit upon while i was doing the Full Screen App (you can see it here). I wanted to add a listener to listen for the FullScreenEvent (package flash.events.FullScreenEvent) in my Application. So i put that onto my creationComplete handler on the Application, i.e.

mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" creationComplete="initStuff()"

and

private function initStuff():void{
stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreen);
}

But, this threw a real time error (RTE) saying...

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at JustFullScreen/::initStuff()
at JustFullScreen/_Application1_creationComplete()

The above error means that the "stage" object is null when it is trying to set the listener. What perplexes me is that if i put this addListener code in a later part of the application, it works. Which means that the stage is getting intitialized between the Application's creationComplete and the place in the code where i'm calling it. Is this a bug or does the stage get initialized later, dispatching a different event? I'm still digging.

Addendum (half hour later): I observed now that including the SystemManager class (mx.managers.SystemManager) and then using the following code in the creationComplete handler works.

import mx.managers.SystemManager;

private function initStuff():void{
systemManager.stage.addEventListener(
FullScreenEvent.FULL_SCREEN, handleFullScreen);
}

So why is the systemManager object required if it is in the creationComplete handler and not if it is in a later part of the code... I'm confused now!!! Gotta tread back to the Flex Gurus :)
The code is here...
Addendum again (the next day) - Thanks Joan for the info. Thanks to her, i found the solution for the above problem...

It seems that the stage is available only after the updateComplete or applicationComplete Events. Read the post that demystified things for me...

Monday, March 5, 2007

My Full Screen Video App - Ver 1.0

I wrote about full screen support in flash, a long time back in Nov '06 (see that post here). I have been planning to write one myself. So finally i got myself down to write it. Before i put you through the app, some details on the API.

To make your application have a fullscreen support you need to do the following things.

1) Have the latest Flash Player (get it here)

2) Use the new Full Screen API
import flash.display.StageDisplayState into your Application and set the displayState of the stage. I have the following function toggling the FullScreen feature. "fsChk" is a CheckBox, based on which I'm toggling the functionality

private function toggleFullScreen():void{

stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreen);


if(fsChk.selected) {
stage.displayState = StageDisplayState.FULL_SCREEN}


else {
stage.displayState = StageDisplayState.NORMAL}

}

3) Update the html-template in which you have the flash App

In the object & embed parts of the html code of the page in which the flash app is inserted, you need to add a new parameter allowFullScreen to true. You can refer the source of the app and view the html for details.

If you want to know more about this feature, refer the Adobe DevCenter article on the same or view the PDF that i have created, collating all that information.

Now the Application. This is just a small video player which can go full screen by checking a Flex CheckBox. This is written in Flex2.0 and you can find all the source files here...

Click here to view the Application
(confirm that you have the latest Flash player)

P.S - I have muted the video to start with, un-mute it if it pleases you :)