Thursday, August 6, 2009

Restrict drag to parent

In my starting flex days I did struggle with giving the proper values to the startDrag() function.

This is how you restrict a component which is to be dragged to within its parents co-ordinate space. ( So that the drag does not go out of the parent ).


var moveParent:UIComponent = moveComponent.parent as UIComponent;
moveComponent.startDrag(false,new Rectangle(0,0,
moveParent.width - moveComponent.width,
moveParent.height - moveComponent.height));

Adobe Developer Summit - Bangalore, 2009

I do quite a bit of experiments on adobe flex. So planning to share and there by enhance my knowledge of flex.
I attended the Adobe developer summit 2009 at bangalore and do I have to say it? It was awesome, extremely fantastic.

Flash Catalyst at the outset seems like a really wonderful tool. When the adobe guys demo'ed the usage with 15-min-full-app kind of stuff, I was like Wow!! This is cool.

I do have a copy of Adobe Catalyst beta on my system and I have to note that creating something ( any app ) from scratch using catalyst is not a childs play. I have asked our companies designer to share with me a psd or an illustrator file. Lets see what happens after that.

Whats new in Flash Builder 4 :

At the outset it virtually looks an awesome thing. Flex builder 3 was by itself a great IDE. But the most wow feature that I saw in Flash Builder was the php introspection stuff that they have added. ( This comes under the data driven development feature they mention..)

In this you point the flex builder to go introspect a php file ( on your server ) and it will return to you a set of functions that are defined in there. You just drag drop that php function ( yes!! you get to drag drop a function) onto your data-eating UI and you are done. !!!

Ofcourse, setter and getter function generation has been a boon, along with the much awaited event handler generation.

Integration with Flash Catalyst was ofcourse understood.