Simple Modular Robotlegs

You know it, when you learn new things looking for documentation or tutorials all over the internet and even if you find potential good source it is some times difficult to focus on the key information while it contains a lot of stuff you do not need at all? Well, there really are some interesting sources for building robotlegs with modules (Modular Robotlegs, DynModules, Modular Tutorial ) but it took me some time to grab only the key functionality. So, I have decided to create the simpliest working project using robotlegs and modules.

Read the rest of this entry »

The Ultimate Resource Manager

How would you like your resousrce manager to be able to access bundle content as easy as RM.bundleName.resourceName no functions used, no parameters, even better with a binding enabled? You like it? Me too. Lets have a look at the implementation.

First we need dynamic variables to be bindable. There are more existing and working solutions for this based on Proxy class. We have to handle getProperty() method and implement IEventDispatcherin order to dispatch events. The final class may looks something like BindableDynamics.

Next, lets do some ResourceManager magic to obtain localized values for our dynamic properties. We do not expect the properties will dispatch changes within one locale, but when locale changes (e.g. switch from en_US to fr_FR) all properties should get updated. A single artificial “propertyChange” event will do a good job for us. Lets call this DynamicResourceManager.

Final step can be custom. For example I like implementation with static (no initialization required) constants (constant works with mxml binding without throwing a warning) that looks something like…

Read the rest of this entry »

Quick Tip: Horizontal And Vertical Scrollbars For A Spark Application

If I remember correctly it used to be native for Flex 3 application to show scrollbars when application content exceeded application width or height. In spark a little hack is needed:

<s:Application ...>
    <s:Scroller width="100%" height="100%">
        <s:Group>
            <s:VGroup width="100%">
                <views:Header id="header" width="100%" />
                <s:BorderContainer width="100%" height="300" borderWeight="5"/>
           </s:VGroup>
        </s:Group>
    </s:Scroller>
</s:Application>

Notice s:VGroup nested inside s:Group component. This is in fact the hack to make both vertical and horizontal scrollbars appear correctly.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes