AIR, Flex / Flash, FMS, PushButton, Game… Developer
ZaaLabs
Ignite Seattle 13
Feb 11th
I had the pleasure of speaking at Ignite Seattle 13 last night. It was a blast! Thanks everyone who showed up.

My talk was titled, Searching for Adam Savage, and was based around a research project that I conducted called Seeker. The basic premise is this:
Modern cell phones frequently include a camera and a GPS. Even if a GPS is not included, cell phone towers can be used to establish the location of the phone. Image formats include special headers that can be used to store this information, so called EXIF tags. In this talk, I described the process that was used to find the information that many consumers (including celebrities) unknowingly broadcast out on the internet.
The article that resulted from my research can be found over at ZaaLabs.
During the presentation one of my slides was missing, somehow creating the slides in Apple Keynote and then converting them to PowerPoint caused some issues.
So here is the slide that was missing.
Also, Ben Huh of Cheezburger Network wants everyone to know that they are hiring.
Tip of the Day – Getting a SWF’s background color
Dec 30th
Recently at ZaaLabs, I’ve been working on a really cool tooling platform called Eden. One of the features that Eden has is a Screen Capture plugin. Eden can send a request to a remote SWF to return a bitmap of the stage.
For example, here is Eden pulling a screen capture from HanClinto’s Platformer Starter Kit.
Really cool! However, I quickly ran into an issue when I tried to take a screen capture of a more basic game.
On the right is the game running in Flash, and on the left is the screen capture.
As you can see, my screen capture doesn’t include the green background. So what happened?
Well it turns out the background color of a SWF isn’t actually part of the stage. The background color that you set using the SWF Metadata tag, or set in Flash Professional is drawn directly by Flash Player.
package { import flash.display.Sprite; [SWF(backgroundColor="0x00FF00")] // <--- How can I get this programmatically? public class SwfBackgroundExample extends Sprite { public function SwfBackgroundExample() { } } }
So I had a dilemma… how could I access the backgroundColor of the SWF? I scoured the API docs, I asked the Twitter-sphere, but no luck. All I learned was that the backgroundColor was hard coded into the bytes of the SWF. So I decided that’s where I needed to look for it.
SwfData to the rescue.
I read up on the Adobe SWF specification, and consulted with my good friend James Ward. He pointed me in the direction of loaderInfo.bytes, which gives us access to the bytes of the currently running SWF.
After a few hours, I had a fun little class I like to call SwfData, which parsed the background color out of the currently running SWF’s bytes… as well as some other fun things. Here’s how you use it:
package { import com.zaalabs.utils.SwfData; import flash.display.Sprite; [SWF(backgroundColor="0x969696")] public class SwfDataExample extends Sprite { public function SwfDataExample() { var data:SwfData = new SwfData(loaderInfo.bytes); trace("version \t"+data.version); trace("frameRate \t"+data.frameRate); trace("frameCount \t"+data.frameCount); trace("fileLength \t"+data.fileLength); trace("bgColor \t0x"+data.backgroundColor.toString(16)); } } }
Using SwfData, I could now use the background color as the fill color of my BitmapData class.
Get It Here
SwfData is MIT licensed under ZaaUtils (do with it what you will). It is available on GitHub
Questions, comments, complaints are all welcome below.
== UPDATE ==
So I just found out that Claus Wahlers has an awesome, more feature complete version of an AS3 SWF parser. It’s also available on GitHub. I’m still going to keep SwfData up since it’s much more specific to getting the background color of the swf. If you need more features, use as3swf by Claus, it’s very well done.
RIARadio, GangstaCast, TheFlexShow and Tech News Today…
Jul 21st
Recently I’ve had the opportunity to participate in a few podcasts, and they all seem to have come out this week. Check them out:
GangstaCast Episode 1: Celebrity Stalker Edition
Also, I was thrilled to find out that I was mentioned on TWiT.tv’s Tech News Today for an article I wrote regarding tracking celebrities by scraping exif data from photos uploaded to TwitPic, yfrog, TweetPhoto and TwitGoo. The part when they talk about the article is about 15 minutes into the episode.
Tech News Today 34: Take Off Your Pants, America
So all in all, it’s been a very interesting week.
Load 40 image formats into Flash. Oh, and it’s open source.
Apr 20th
For for those who don’t know, I’m one of two people behind ZaaLabs (the other being Aaron Boushley). Today we released ZaaIL, an Adobe Alchemy port of DevIL an open source C image library.
Built in image support of Adobe Flash Player limits you to 3 image formats: gif, jpg and png. While this has worked well for many, many years… I recently have needed to expand the types of formats that I could use in Flash Player. I should also note that you can absolutely add support for these formats directly in ActionScript using ByteArray. For example Mike Chambers blogged about an AS3 BMP parser.
I was originally looking for support for TGA, BMP and PSD, when my friend Ben pointed me to DevIL and challenged me to port it using Alchemy.
Porting C code using Alchemy is not a very straight forward process, but between Aaron and I… and with help from Ben Garney and Branden Hall… worked our way through it. We plan on a series of blog posts discussing the process of using Alchemy in detail. Hopefully we can garner enough interest in the community around Alchemy to get Adobe to continue work on it.
ZaaIL is being released as open source software (MIT if you’re interested). We will post it all on GitHub when we get the chance.
[sidenote]
I have been asked by a few people if I think Adobe should expand from their three image formats and use something like DevIL in Flash Player… I don’t think they should. Adobe has given us the tools to create really cool things such as ZaaIL. I’d rather the Flash Player team focus on things I find way more important… such as 3D support, mobile performance, hardware accelerated graphics, etc…
[/sidenote]
ZaaIL allows developers to now to load more that 40 different image types… go ahead give it a try, I particularly like using a PSD file or cover art embedded into an MP3 (View source is enabled):
More information can be found over at ZaaLabs.



