Blog2Blog Maak je eigen Blog2Blog | Gratis je eigen blog c.q weblog op internet
Wubinator's Flex Coding

Wubinator's Flex Coding

� 2 April 2009 - RIAs that Rock

There is an excellent developers blog on Adobe about Rich Internet Applications that just standout from the crowd.

Reacties (0) :: Geef een reactie! :: Permanente Link

� 1 April 2009 - AIR != Silverlight

It is just over a year ago that Peter Elst added an article on his website that explained why AIR cannot be compared to Silverlight. Because sometimes I still notice that people don't know this I decided to add the link to his article again:


Reacties (0) :: Geef een reactie! :: Permanente Link

� 25 March 2009 - Flex Formatter

I always missed the option inside Flex Builder to format ActionScript of MXML code, the Ctrl+shift+F method that is available for Java in Eclipse.


A month ago or so I've found a good open source version that is excellent in my opinion. Also the developers are still very active with the project, so if you have any issues just leave a message on their forum and you'll get a reaction and an improved version fast.


The project is called FlexFormatter

Reacties (0) :: Geef een reactie! :: Permanente Link

� 25 March 2009 - PopupHelper

There is something when working with Popups that I don't like. The component that is shown inside a popup knows it is a popup, because it will need to handle the closing of itself using PopupManager.removePopup(this). This is also the method shown in the Adobe livedocs

In my opinion it is a more elegant code if the component that is shown inside a Popup does not need to care about removing itself as a Popup. Also when the same component is used somewhere else in a ViewStack for example instead of in a Popup the removePopup(..) method is redundant.

Therefore I've created the PopupHelper. This is a class that will create a BasicPopup (a custom component) which is an extention to the TitleWindow component and it will listen to the CloseEvent.CLOSE event of this BasicPopup. The PopupHelper will also set the component that must be shown inside the popup inside this BasicPopup and it will place the popup in the center of the provided parent if requested. This way the component inside the popup can just handle the logic requested for that view and the PopupHelper will handle logic required for handling the popup .

To send properties to the component that will be shown the PopupHelper accepts a contentClassProperties:Object argument. These will be given to the contentClass that needs to be shown.

Here is the PopupHelper:

package nl.wubinator {
    import flash.display.DisplayObject;
    import mx.managers.PopUpManager;
    public class PopupHelper {
        public static function createPopUp(
            width:Number = 400,
            height:Number = 300,
            title:String = "",
            showCloseButton:Boolean = true,
            showPrintButton:Boolean = false,
            centerPopup:Boolean = true):BasicPopup {

            var popup:BasicPopup =
                PopUpManager.createPopUp(parent, BasicPopup, true) as BasicPopup;
            popup.width = width;
            popup.height = height;
            popup.showCloseButton = showCloseButton;
            popup.showPrintButton = showPrintButton;
            popup.setContentClass(contentClass, contentClassProperties);
            popup.title = title;
            // Add an event listener for the Close event that can be dispatched
            // by the close button in the BasicPopup
                function(event:CloseEvent):void {
                    // Stop the event from bubbling upwards further
                    //Remove the listener, so the garbage collector can clean up the class.
                    popup.removeEventListener(CloseEvent.CLOSE, arguments.callee);
            // If the provided centerPopup atttribute is true the popup will be centered
            // to the provided parent DisplayObject
            if (centerPopup) {
            // Return the created popup
            return popup;       

Below you see an example of how the PopupHelper can be used to create a popup.

// Now open a popup to show details about this transaction
var properties:Object = new Object();
properties.transactionNumber = this.transactionNumber;

PopupHelper.createPopUp(Application.application as DisplayObject,
                                        760, 610,
                                        "Transaction details",
                                        true, false, true);
Reacties (0) :: Geef een reactie! :: Permanente Link

� 24 March 2009 - Dynamic multilanguage Flex applications

A little while ago I found a good site to help me implement a dynamic multi language Flex Application. This means that it allows the user to have the entire Flex application change the used language of the texts on the fly.


Reacties (0) :: Geef een reactie! :: Permanente Link
The weblog that will provide you with interesting news and code examples about Adobe Flex / AIR.


Code examples
Usefull links


My profile

AIR != Silverlight
Page 1 of 1
Laatste Pagina | Volgende Pagina