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 (7)
Tags: , , ,

Am I the only one who sees things like this?

Just look at the image below. The left version is the bottom right corner of my Chrome browser window (version 8.0). This logo appears on every new empty tab, and I can’t help but wonder why Google didn’t spend 15 seconds making it look nicer. The version to the right literally took that long to make. I added a little padding, made it more subtle and changed the way the text aligns with the logo.

Looks much better, doesn’t it? I think it went from “Hey, there’s room for a logo there” to “all this awesomeness os powered by Chrome”. If I were a company trying to promote a new browser, I’d try to get these things right. And it’s not like they can’t afford it, right?

Roy | November 17, 2010 | English,Internet,Software | Comments (10)
Tags: , , ,

WP Time Machine – free off-site backups for WordPress

A few days ago, @bakkel tweeted about WP Time Machine. This WordPress backup solution turned out to be exactly what I’d been looking for. It gathers all the relevant bits (like your blog’s database, uploaded images, etc) and uploads them to Dropbox, Amazon’s S3 or FTP. It even adds a file with comprehensive restore instructions. I’ve argued before that backups need to be absolutely painless, and with this plugin they are.
More WP Time Machine – free off-site backups for WordPress

Idea: A WordPress theme for e-mail newsletters?

There are plenty of way to have “automated” newsletters sent out based on your WordPress blog’s RSS feed. Feedburner and MailChimp, among other do this, and there’s nothing wrong with those services.

However, if you’d want to write content specifically for your weekly e-mail, RSS is not ideal. High quality e-mailings usually don’t simply copy blog posts, they’re carefullt crafted by copywriters to get as much response as possible. That’s why the idea of a newsletter-theme has been floating around in my head. Here’s what I’m thinking might work…
More Idea: A WordPress theme for e-mail newsletters?

My next keyboard may well be solar-powered

I’ve been using a Logitech Ultra-X keyboard for a couple of years now, and it’s an abolute delight. But with the wear and tear of daily use, it’ll probably need to be replaced soon. Like with mice, I like wired keyboards. I don’t carry them around, and the wire running across my desk doesn’t bother me. Not enough at least to deal with the hassle and pollution of wireless keyboards that use batteries.

That’s why I love Logitech’s new K750. It has the type of flat, laptop-like keys I like, and is solar-powered. The press release says indoor lighting should be sufficient, and if that turns out to be true, this may well be the ideal combination of wireless freedom and battery-free convenience. Very clever stuff.

Now I realize that somewhere inside this thing there’s a battery. So eventually, when my future K750 is in the state my Ultra-X is in now, it’ll be a little harder to recycle. But at $80, and given Logitech’s track record, I’m expecting it to last for a long time. Now all I need is a motion-powered(?) mouse to go with it.