Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.


The My Avatar Editor Project

Posted February 18, 2009 by senocular

Well, I finally did it: released one of my pet projects, My Avatar Editor - an online, Flash-based editor for creating avatars compatible with Mii™ characters on the Nintendo® Wii™. And this after years of development and a number of hurdles including a cease and desist from the big N.
If I remember correctly, I started this project sometime late in the year of 2006 not too long after the release of Flash (Authoring) 9 Beta on labs, if anyone remembers that. Flash 9 Beta was essentially Flash 8 with support for ActionScript 3.0, which had been released earlier for Flex 2. I believe, in fact, this was the first time a rev of ActionScript preceded a Flash authoring release. Nevertheless, I was excited to get my hands an authoring tool that I could both draw in and code AS3 with.

I was also excited to have gotten my hands on a spankin' new Nintendo Wii (thank you mom!). And when other people (smarter than myself) got excited about hacking the Wii remotes and being able to download Mii character data from those remotes onto their desktops, I got even more excited! I thought this was the perfect opportunity to learn AS3 using Flash 9 and get my hands dirty with the new ByteArray class.

So then I went to work. The first order of business was to reverse engineer the Mii data file so I could know what data I could get into Flash to recreate the character there. Luckily, I could tell the file was small enough that it didn't actually include any geometry and most likely just included some hints on what needed to be drawn rather than how to draw it (otherwise my plans were ruined).

Hours of sitting in front of the TV making Mii characters with one characteristic changed, uploading to the Wii remote, downloading to the computer, diffing, logging, and repeating later (days if not weeks in the end) I figured it out. Then, I think it was exactly 2 days after that, Wii Brew figured it out and posted the results online :P. No matter, I had a 2-day head start!

At this point it was all about Flash and ActionScript. And really, the ActionScript part wasn't too bad. Sure, I was struggling with AS3 just having started using it, but it wasn't so bad pulling a few bytes out of some binary; it wasn't like pulling teeth or anything - so much. It gets a little tricky when you're dealing with bits across multiple bytes, but I could handle it, and did. I created a small interface for loading binaries and displaying their data and all was good. All that remained as making the graphics.

HA! Sounded simple at the time, but that was easily the hardest and most time consuming part. Recreating 3D characters in 2D was/is not as easy as it sounds, especially with the amount of precision I was targeting. This took months and actually continues even today as I make small tweaks and adjustments from time to time.

Long story short, the project developed as miieditor.com, got popular, got a C&D from Nintendo, got pulled down, people got sad, it came back as myavatareditor.com hopefully remaining under Nintendo's radar, and now has all of its source files are available from Google Code under the MIT License.

Now, concerning the source code: I did clean it up a little; there was a lot of ugly legacy code in there from "the good ole days" but it's still not pretty, especially given how it started out as a quick, self-learning, Flash Authoring project. For example, I probably wouldn't have used the timeline as much as I did having known that this project would have gone this far, but I didn't know that, so there it is. In other words, try not to use this project as a source of best practices ;).

But its been a fun, long ride for this little side project and I'm happy to see it get out there for others to use and take advantage of should they want to.