Author Archives: Mister

AIR :: TextField bug when resetting HTML text.

I ran into a really strange issue that only occurs within AIR applications (AIR 1.5.1/1.5.2). When I create a TextField control, set it's style, and then assign it HTML text it appears fine. However, if I wish to reset that TextField content and the original content has links, the entire replaced content becomes one HTML link. I think the issue can be better explained with some images and some code samples.
Posted in AIR, Bugs, Flex | Tagged , , , , , | Leave a comment

Flex :: Truncating HTML Text

With Flex truncating text within a Label control is easily done by setting the property “truncateToFit” to true. This parameter doesn’t do much when using the Text or TextArea controls in Flex. To truncate text in these controls you would have to build your own function to count characters and add the ellipses. There is [...]
Posted in AIR, Flex, Flex 3 | Tagged , , , , | 6 Comments

Using AIR 1.5.1 InovkeReason for friendlier applications

I recently discovered a new feature of AIR 1.5.1 that makes AIR applications more consumer friendly in certain situations. When you have your application set to start on user login using “NativeApplication.nativeApplication.startAtLogin = true”, you may want the application to start as a background process rather than show the entire application at login. In AIR [...]
Posted in AIR | Tagged , , | 6 Comments

Adding Mac OS X Close Behavior to AIR 1.5 Application

Just a quick post because I have seen this done on other sites but it no longer is valid in AIR 1.5. Most Mac OS X applications minimize to system tray on closing the application using the “x” close button on the app. To achieve this in AIR 1.5 you will need to do the [...]
Posted in AIR | Tagged , | 5 Comments

Garbage Collection and Event Listeners

On a recent AIR project I have become aware and subsequently obsessed with memory. My concerns have centered around garbage collection and event listeners, specifically how you clean up event listeners to allow Garbage Collection (GC) to clean up objects. Most DisplayObjects implement the EventDispatcher class that allows it to broadcast events. Trolling around the [...]
Posted in AIR, Flash, Flex, Flex 3 | Tagged , , , , | 3 Comments

AIR :: NativeMenu issue on Mac

I think the NativeMenu is a great option for AIR applications as you can get a consistent look for the application that matches the operating system. The other advantage is that NativeMenu’s are “outside” of the application and do not get clipped as they would if you just created a popup Canvas with a List [...]
Posted in AIR, Flex | Tagged , , , , | 1 Comment

Placing a ContextMenu on TextArea in AIR 1.5

The TextArea in Flex comes with its own contextual menu, so adding one does absolutely nothing but leave you wondering what the heck you are doing wrong. In the bug report there is a bit of a work around for AIR 1.5 which requires you to access the “textField” property of the TextArea and add [...]
Posted in AIR, Cairngorm | Tagged , , , , , , , , | 1 Comment

Dude, where’s my phone (GPS)

I thought I had lost my phone for the past day, I looked every where and called it a few times, no luck. So I remembered I had the InstaMapper GPS software installed. You can send an SMS to the phone with your InstaMapper key to activate the GPS and have it report its location. [...]
Posted in Flash Remoting | 2 Comments

HTTP Status 201 causing Flex #2032 Error in IE only

I ran into a problem right when we were going to launch a new Flex web-based application to production (of course) with Internet Explorer and Flex. I was calling an RESTful service that returns XML and using the built-in Flex HTTPService with either POST/GET as the method for the request. Most of the service calls [...]
Posted in API, Flash, Flex | Tagged , , , , , , | 3 Comments

Smooth Scrolling HorizontalList

This example is based on Alex Harui’s Smooth Scrolling List. It just changes the code to work with the HorizontalList control rather than the List control. The SmoothHorizontalScrollingList class extends the HorizontalList control adding the needed functionality to allow smooth scrolling:
Posted in Component, Flex | Tagged , | 16 Comments