Archive

Posts Tagged ‘Actionscript’

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 , , ,

Intro to Google Maps API for Flex

February 18th, 2009

Google Maps has proven itself to be one of the best mapping systems on the internet. We have also seen a great number of google maps mashups take place (Everything some Subway maps to where is the cheapest gas). I only felt it would be nice to have an intro on how to use the google maps API with in Flex. On that note, it has been four posts since I have done a How-To article, so this is even more fitting. Within this tutorial, I will just go over some basics on how to add and edit Markers on a map and keep track of them in a grid.
Read more…

Marcel Flex, Google Maps API, tutorial , , ,

Compiling to Flash 10, requiring Flash 9

February 9th, 2009

Whenever Flash 10 came out a few months ago, they made a pretty big change to the security model which did not allow events to send files. Everything had to be handled by human interaction (AKA: MouseEvent.CLICK). Unfortunately that means that you now have to support both Flash 9 and Flash 10 in your flex/actionscript code. You never know when someone is going to upgrade to flash 10 to use your application. The problem is that in a business environment, it’s poor taste to require a business to upgrade everyone to Flash 10 to use your software. In fact, a lot of times, that upgrade is not even an option. If you compile something in Flash 10 though, your clients are greated with a nice message of ‘You must upgrade your Flash player in order to use this’. What we need to do is maintain binary compatibility with Flash 10, however not require it.
Read more…

Marcel Flex, Random Notes, tutorial , , ,

How to create a dynamic filter component

February 3rd, 2009

Most all web applications that I have worked on really break down to same types of components. There is usually a grid, perhaps a chart, maybe tab navigator at the top and, of course, a filtering mechanism. Lots of times, you will use the filtering down to the sql level to get data. However, its not always necessary to do that. The DataGrid component within flex does have a filterFunction property and there is no reason we shouldn’t take advantage of that. In some cases, depending on our object model, its tough to do that a “framework level”.

Now when I am coding up framework level components, I do try to keep application specific logic separate from just core components. (common sense. otherwise its not a framework level component). But I feel that a large amount people feel the filtering logic is all application specific and don’t necessarily take the time to write something in a more clean, reusable way. I have come up with a more usuable method of creating and adding filters dynamically at run time.
Read more…

Marcel Flex, tutorial , , ,

BlazeDS with Remote Objects example

February 1st, 2009

In my previous tutorial on BlazeDS, I went over an example over how to setup remote objects with data push. There are however, a lot of instances where someone just wanted to receive data and they aren’t concerned with it being updated., so it turns more into a ‘client requesting data whenever it wants it’ scenario. This article will not be nearly as indepth as the last blazeDS article, but if you have not setup your environment for BlazeDS before, it will probably be in your best interest to check it out.
Read more…

Marcel Flex, tutorial , , ,