Draggable TitleWindows in Flash Builder
Posted by: Keith H in Flash Builder, Flex, tags: ActionScript 3, Flash 10, Flash Builder, MXML, TitleWindowI like using MXML because it is quicker than writing ActionScript for a lot tasks.
When you create a TitleWindow in MXML, it is not draggable.
To make a TitleWindow draggable you have to create the window in ActionScript using the PopUpManager methods "createPopUp" or "addPopUp"
I wanted this process simpler so that next time I wanted a draggable window, I could just use a simple MXML tag.
Here I extended the TitleWindow to make it be automatically added with the PopUpManager.
Also all the child components get carried over after PopUpManager is used.
I did this so I could lazily use MXML and all references to this component instance stay intact, because the PopUpManager is using the same instance of the MXML component.
The "Move Left" and "Move Right" buttons show that the references are ok.
Entries (RSS)