Not all mistakes are in the code

I’m working on a small Flash application for an upcoming exhibition. Unfortunately I don’t get to work in Flash as often as I’d like, which means that every new project leads to relearning everything I’ve forgotten since the last project (this time, it’s been almost a year, so that’s a lot to relearn!).

I had everything working smoothly except, my dynamic text boxes refused to display the text from the linked xml document. I traced the relevant fields, and they were definitely being accessed, but they just wouldn’t show up in the swf.

Grrrrrrrrrr!!

I scoured the code for missing semicolons and misspelled functions, but it was a fruitless search. I finally gave up and asked my colleague Tina to have a look. She’d been dipping into Flash more recently than I, so her recall of AS3 had to be more reliable than mine. I figured it had to be a syntax error, or maybe I called the wrong function somewhere. She spotted it in about three seconds–my text font in the properties panel was set to the same color as the text box background.

D’oh!

I learned two things from this: not all mistakes are in the code, and a second set of eyes is almost always helpful. Well, make that three things–check the damned font color!