Ok so, in the beginning of 2010 I made a New Years resolution that I would learn one new thing each week and blog about it. Like most resolutions, it went for three weeks and then failed miserably. Now I would normally look at this as a failed attempt to commit to learning. However, the reason that I'm not able to keep up with this is because I am just too damn busy. I'm 6 months into my new job at Neo-Pangea, and loving it. We are developing some really awesome Flash applications that push the limits and are just down right bitchin'. So it goes without saying that I "am" learning more and more as we continue to kick ass for our clients.
Hulk Yourself
This is part of my 2010 resolution of learning something new each week. I've been playing around with using ActionScript's BitmapData and FileReference classes.
Use your webcam to position yourself in the frame. Then you can save an image to your hard drive. I still need to tweak some things, like adding controls to adjust the brightness. Press the "BEGIN" button to Hulk Yourself.
Flash Resolution-Week 3: Google Maps API + iPhone GPS Tracking
To build on my previous post about the Google Maps ActionScript API, I wanted to track the position of my iPhone in real time. I came across the site instamapper.com. After creating a free account with Instamapper and downloading their iPhone app from the Apple App Store, I was tracking my phone in no time. They have prebuilt maps that you can embed on your blog and even a Facebook application. Although I wanted to use my own map so I can have more control over the map. Instamapper has a simple little API that you can use to retrieve your information. A http call returns a string of all the data about your phone's location. Using a URLLoader to load in the request (http://www.instamapper.com/api?action=getPositions&key=584014439054448247) returns the data:
InstaMapper API v1.00 0071543339995,Demo car,1209252615,47.58822,-122.17969,25.0,27.7,349
The format of each record (seporated by commas) is as follows:
- Device key
- Device label
- Position timestamp in UTC (number of seconds since January 1, 1970)
- Latitude
- Longitude
- Altitude in meters
- Speed in meters / second
- Heading in degree
So using a split() method on the returned string, I could just parse the latitude and longitude coordinates and sent them to my Google map object. Here is a screen shot of my application. The only problem is that instamapper.com does not (yet) have a cross domain policy, which is not allowing the SWF on my server to access instamapper's server. Though it works just fine when run locally. So for now, this is just a proof of concept.
![]()
Flash Resolution-Week 2: Google Maps API
Incorporating Google Maps within Flash is one of those things that I always wanted to look into, but just never really had the time. Well it turns out that I actually did have the time, due to the fact that it only took me 10 minutes until I had a working example. I followed this tutorial from www.layersmagazine.com.
So in my example I simply mapped Mikey's house from The Goonies and inserted the Goonies logo. Yes, I am a little geeky that way. And if you don't like The Goonies please leave this site now. Just kidding.

Flash Resolution-Week 1: BitmapData & Trigonometry
A couple of areas that I'm trying to improve in are BitmapData and Trigonometry. Trig is really useful in Flash for working with angles and BitmapData can give some pretty cool effects.
I started this example by making a MovieClip rotate around a center point. I know I could have used TweenMax to rotate around a center point, but the idea here is to do the math, remember? Here are some posts I referenced. Kirupa, ActionScript.org.


After I got the MovieClip rotating, I decided to use it to create some interesting effects with BitmapData. I simply referenced the ActionScript 3.0 Language Reference for this.
[Move your mouse around the stage. The closer you get to the center cross hair, the smaller the ball's radius gets. Click and drag your mouse to draw lines from the center.]
My 2010 Flash Resolution
For a while I have been wanting to focus on the areas of Flash where I am weakest. So what better way to step up my game than to make a New Year's resolution.
My resolution:
Once a week I will learn something new and post a blog entry about it here. I don't claim that I will be doing any mind-blowing or uncharted discoveries or anything, but this will be an area where I will document my process. I hope it will help others who aren't familiar with some of these concepts, but it's mostly for me to keep tabs on myself.
We'll see how I do...

