Flex 3 Internal Build Error when using a SWC with BitmapData from Flash CS3

I just ran into a frustrating issue with Flex Builder 3 that wasted my entire morning. I did manage to track it down, however, and thought I’d share it.

I was using Flash CS3 to create a SWC with an embedded image, and then creating an instance of that image from Flex Builder 3. Flex threw an “Internal Build Error” whenever I tried to touch this image’s class. According to the build failure log, the compiler was choking up when it was trying to get symbols from the SWC.

As it turns out, when you create an extension of the BitmapData class in Flash CS3, and set it to re-encode as JPEG, Flex can no longer convert that image to a format it understands. As soon as I changed the settings to export the image as Lossless, the compiler error disappeared, and everything worked. The image works fine in Flash CS3 either way, so there must be a bug somewhere in the Flex compiler in regards to JPEG imports.

Embedding fonts for Actionscript Projects using only mxmlc

I was hacking around with Flex Builder today and stumbled on a fairly easy way to handle font embedding for Actionscript projects without having to resort to Flash CS3 or venturing into the murky territory of using Flex classes in Actionscript projects. I only tested it with Flex Builder, but it’s all doable through the command line compiler as well. I will be creating a class that handles the nitty gritty on the Actionscript project side of things, but for more enterprising souls, I’ll describe the method I found. (more…)

TOJam 3

TOJam was amazing as always. This is certainly the best year so far, in my opinion. Seems that the majority of attendees were using Flash this year, so Alex and I ended up answering a bunch of technical questions throughout the course of the weekend. I got one full night’s sleep of roughly 8 hours. More than I wanted to get, actually, given that getting to and from the event took at least an hour each way.

Things got off to a bit of a rocky start for me, as there was a huge window on my end of the room, and the sun was shining directly at me at that point. It was overheating my monitor, so I had to shut down until the window was covered with a colourful assortment of posters, The Yellow Pages, and free newspapers. Once that was taken care of, the room was surprisingly cool for the remainder of the event. Last year was pretty stuffy with just 80 people, so I’m impressed at how nice it was in there with a good 120 filling it out.

I can’t really estimate how much faster I was this year just by virtue of using my desktop machine rather than bringing a laptop. I’ve gotten very used to having two rather large monitors, and downgrading to a single tiny laptop screen feels very cramped. I had myself up and running by about 5 pm on Friday, and Alex arrived shortly thereafter. I wrote a sort of skeleton for the game just by throwing down some base classes with empty methods, and we sort of went off on two streams working in parallel. Alex handled all things related to the machines on the factory floor, and most of the GUI stuff, and I handled the conveyor belts, world tile mapping, cheese behaviour, and game economy. Working with a second programmer made the whole thing go so much more smoothly, as there was always at least one of us on hand to help the artists figure out ho to integrate new content.

Things ran very smoothly, and I have to say it was a lot of fun, and definitely a relief, to forget about architecture and just build something fun and playable. Over the course of the past two years, my professional and personal development projects have all been rather heavily (over) architect-ed affairs, so this was a nice break. It reminded me of some things I’d forgotten about why I got into software development in the first place.

The last couple of hours of the event were certainly interesting. I threw our sound list at one of the sound floaters, Chris, and about 15 minutes before keyboards-down he showed up at our table with a USB key. Unfortunately, due to a really minor problem on our end, the sounds were not working when we demoed the game. I got the sounds working within 5 minutes of getting the game home. What did work out well was our artist exchange program. Miguel is a fantastic sprite artist, and the team next to us, Squidware, had Eric, who does amazing painting-style visuals. They needed some sprites, we needed a title page. It worked out very nicely for both sides, and I think next year I will try to advocate it a bit more. There are a lot of people with specialized skills around, and if we can get a bit more sharing going during future events, it would set the quality bar even higher.

I also took the time to create a little illustrated instructions page and threw it up on the second monitor. It was very useful, but I learned that people tend to ignore what’s on the second monitor if you have two. Instructions will be embedded into the game some time in the near future.

Our game was Der Baron Von Ubercheesen: Cheese Factory, a neat little crossover between Sim City and The Incredible Machine. We got very far with it, and I have to say it has one of the highest levels of polish that I saw at the event, by virtue of our staged approach to building the game, and the top notch quality of our art duo of Miguel and Rosemary. We’re going to continue working on the game in our spare time, with an eye towards releasing it through Armor Games.

Stay tuned for updates regarding Der Baron.

PseudoFile Library First Release

This is a set of utility classes that I’ve created to handle File I/O a bit more gracefully. I’ve adopted the approach of being File-centric as opposed to Loader-centric. All event listeners are created on individual files, or lists of files. This makes it a lot less cumbersome to wait for a batch of files, or to load a batch of files and perform actions when specific files are loaded.

The ASDoc output is currently included with the package, but I will create docs.andrewtraviss.com to store all of my asdoc output, as well as providing a seperate asdoc download package. Any feedback would be greatly appreciated. I believe the API is solid, and have no plans to remove or alter the existing methods. New methods may be added to provide additional functionality, however.

Download the PseudoFile library here

Getting settled in

Given that everyone else in the business seems to have a blog of their own, I figured it was about time I caught up. I likely will not post very often; I’m not the most talkative person on the planet. Mostly I will be posting when I have something useful to share. I won’t bother with reviews of conferences; I think this area is covered quite well by others, but if a conference inspires something new out of me, I’ll be sure to put it up. Stay tuned for something useful.