Erratic behavior with Flash’s textWidth property

Just a quick post in case anyone else ever runs into this and manages to find their way to my blog.

I just came across this in a client project I’m working on. I was using a TextField in Flash CS5, and needed to know the width of the actual text inside it for positioning purposes. What I found was that in about 50% of cases, the textWidth property would return zero instead of the strings length in pixels. I tried using autoSize on the TextField and found that it would shorten half of its instances to a single character or less, causing the rest of the line to be invisible.

At first I thought there was something wrong with the font file, but the same happened with Verdana. So I started randomly changing settings, and it turns out that the “anti-alias for readability” setting was causing this. As soon as I changed that setting to “anti-alias for readability” the textfields were being autosized properly, and reported their actual lengths through the textWidth property.
More Erratic behavior with Flash’s textWidth property

Roy | November 25, 2010 | English,Flash,Programming | Comments (10)
Tags: , , ,

Getting Adobe AIR to use the default browser under Ubuntu

Adobe AIR logo smallI’ve searched high and low for a good native Linux Twitter client, but there’s nothing out there that can really compete with TweetDeck. At least not in terms of functionality. TweetDeck is based on Adobe’s AIR platform and as a result is quite heavy on resources. But the biggest problem I had with it was getting it to open links in my default browser. It disregarded my setting and used Firefox to open all links. Twitter is far less fun if you need to carefully copy paste every link to a new tab in your browser. As it turns out, the issue is with AIR, not just TweetDeck, and it took quite a while and a lot of help for me to find a working solution.
More Getting Adobe AIR to use the default browser under Ubuntu

RIOT: Save optimized web images from Irfanview

RIOT image optimizerI’m a big fan of Irfanview. It’s one of the best examples of how I think all software should be: small, light and with just the right features. I use it every day, and can’t recommend it enough. But Irfanview isn’t perfect. It applies the default worst icon I’ve ever seen to your images, but more importantly it’s not very good at optimizing images for the web. JPEGs saved from Irfanview were consistently worse in both quality and file size compared to the same saved through Photoshop’s ‘save for web’ feature. That’s where RIOT comes in.
More RIOT: Save optimized web images from Irfanview

Cumulus as a Flex component

WP-Cumulus flex componentA while ago I was asked to do a Flex version of WP-Cumulus. Because I don’t know the first thing about Flex, I failed miserably :). But the fun thing about open source software is that anyone with the right skills can pick things up and create the version they need. Carlos Carvalha did just that and did a Flex version for use with Drupal. If Flex is your thing, you can download the files from Carlos’ page. Because this is a ‘modified version’ of my WordPress plugin, it is automatically licensed under GPL, and is thus free for you to use.

Carlos’ blog is pretty interesting btw. Definitely the first blog theme I’ve seen that’s built entirely in Flash.

That’s it, I’m switching!

Ubuntu logoIt’s funny how I just discovered a great feature in Vista by reading up on how to install Ubuntu alongside it. I didn’t know Vista could shrink partitions without the need for 3rd party tools. Well it can and I did. To make room for Ubuntu. I plan to move away from Windows for anything but design work. I’ll need Photoshop for that and there isn’t a viable Linux alternative for Flash either. But other than that I can’t wait to switch to Linux full time.
More That’s it, I’m switching!