Archive

Archive for the ‘Flex’ Category

When and how to use mx_internal in Flex

March 12th, 2009

How many times have you hopped into Flex’s source code only to see the modifier “mx_internal”? No public, private or protected, just mx_internal. It is everywhere in there. But what is it? Turns out, according to Adobe, it is a namespace used to flag functions and properties within the framework that may change in future releases. Obviously, since they might change, Adobe, with all its motherly goodness, hides these properties and functions from us behind this namespace. This does not mean we cannot access them though. We just have to jump through a few small loops. This article will go over how and when to use mx_internal, but also what to be careful about when using them.
Read more…

Marcel Best Practices, Flex, Opinion, Random Notes ,

Intro to Google Maps API for Flex: Part 2

March 9th, 2009

It is hard to deny that the Google Maps API has a lot of built in functionality to it. I enjoyed writing the last article and I felt it was time to get into it a little more. In my last last article on the API, I focused primarily on how to add a marker to the map and also how to create a custom infoWindow. This article’s main topic will be on how to plot PolyLines on a map, how to get the distance between them, and using Markers to had a little bit more usability to your application.
Read more…

Marcel Flex, Google Maps API, tutorial , , ,

5 tips to help designers style your Flex components

March 3rd, 2009

Alright designers, lets get one thing straight. I don’t like you and you don’t like me. You design components that are either a)impossible/painstakingly difficult to build or b) has more transitional effects that even make a mac snob would vomit. Dare I complain? Too bad. The client already signed off on it and they loved it. Guess what though, jokes on you! Following my typical fashion, I have made it as easy to style as you have to build it. TAKE THAT EDGY COOL GUY(or girl)!.

Unfortunately, this vicious circle doesn’t help you and it doesn’t help me. You can call me lazy and I can call you a moron but it leads us to the same spot. With this in mind, I’ve recently decided to extend the olive branch. I have sat down with one of the main designers at my job and asked “What can I do to my components that will make your job easier?”. With a warm smile, he thanked me and gave me some good tips on how I can make not just his life easier, but also make my components just that much more versatile.
Read more…

Marcel Best Practices, Flex, Opinion, Random Notes, tutorial , , ,

An indepth look at Flex Events

March 2nd, 2009

One of the great things about I love about Flex is that it is fairly close to writing a desktop application. You can, for the most part, even take a Flex application and publish it as an AIR application for your desktop. In my opinion, one thing that makes it extremely similar is the way it handles Events. Its all about the eventListeners. As we all know, it is never as easy as adding an eventListener in one spot and a eventHandler in another. Within this article, I want to discuss how to add and handle eventListeners, dispatching them, how to stop event from propagating, difference between a target and a currenttarget, and the ever important thought of when to remove events.
Read more…

Marcel Best Practices, Flex, Learn This, Opinion, Random Notes, tutorial , , ,

Overriding core UIComponent Methods

February 19th, 2009

Whenever I am working on a Flex project, it is quite seldom that I have been able to take an out of the box component and have it do EXACTLY what I need to do (barring something like a Label). Sometimes I need to create a container component to use as an itemrenderer for a grid. However, sometimes it is not as easy as whipping up some mxml tags to layout what we need. Luckily though, there are 5 methods that every UIComponent implements* that we are able to override and manipulate our objects as we wish. These methods are createChildren, commitProperties, measure, layoutChrome and updateDisplayList. I will be giving a brief explaining of what they are and why we would override them. After that, I will be discussing the flags within UIComponent.as that call these functions and some things to watch out for when overriding these functions.
Read more…

Marcel Best Practices, Flex, tutorial ,