Currently Browsing: Reflex

How To Build a Behavior in Reflex

Update: If you don't know what Reflex is, I've just introduced Reflex. Building a component in Reflex consists of 3 things: making the component class, building the behaviors, and creating the skin. The component class is an extension of Component with your new component's name and a few public properties that you feel might be important to that type of component. The real logic of the component goes into its behaviors, so that is where we are starting today. What is a Behavior? A behavior is a well defined piece of functionality that may be used by one or more components. Behaviors do not necessarily...read more

Reflex Demos

At 360|Flex we showed some pretty cool demos. The coolest one Tyler made and is on his blog, so go check out the Phases of the Moon there. Here are some you can right-click to view the source. We have some examples of how skins and behaviors can be swapped out: And a demonstration of how behaviors can work with any Flash display objects (including Flex ones in this case): Enjoy! Update: Oh, and here are the slides. read more

AS3 Property Observer Implementation

Update: The final implementation. Monday I wrote about how I would use the observer pattern to alter the functionality of getters/setters and respond to changes without using Flash's events. Tyler and I brainstormed more about the solution and as I knew would happen we came up with a better implementation. Changes One thing I didn't like about my initial go at it, is that you had to create a class with three methods, and usually you only used one of them. So methods were being called that didn't need to be for the sake of it. We decided to add functions on an as-needed basis. I named the different...read more

An Alternative to using PropertyChangeEvent

Update: A post about a trial implementation, and then the final implementation. I've been trying to figure out the best way to include a styling framework with Reflex as needed, without requiring APIs and including extra classes in the core. Pay-as-you-go. The solution that I finally came up with turns out to be great for not only styling, but effects/transitions and data-binding too. I'll start with data-binding to try and describe the benefit. Flex Data-binding In Flex we have data-binding. Data-binding is cool. Allows us to do stuff a lot easier. We use it in almost everything we write in Flex. Unfortunately,...read more