HTML CONTENT HERE

Tracy Chapman wins FWA!

I just got the call from Jason that the site I built for Tracy's new album, 'Our Bright Future' has won the FWA for December 28, 2008!

Very special thanks to Jason, Adam, Sanaz and Hampus at Ordinary Kids and of course Tracy and Gretchen for making it happen. What a great Xmas present!!

New Work - Tracy Chapman

After four months of traveling throughout the US and France, and Italy I have finally landed, now in the beautiful city to the south of my beloved Portland, San Francisco. It was an awesome nine years living in Stumptown and I already miss the great friends I have made there over the years.

Tracy-Chapman-Our-Bright-Future

After getting back in the states in late September I shuffled down to SF in search of work and while hustling out of hotel rooms all over the city I worked with the brilliant team over at Ordinary Kids to produce the new Tracy Chapman site. The site leverages a simple painting engine that I wrote which lets you paint the elements onscreen as you cruise around the site. I think a great addition in V2 would be to add functionality to save your creation to a gallery or maybe write a cookie that saves your painting for the next time you return.

As for being in SF. I am loving it here and siked to finally be able to pour myself into my work again. I am currently taking on freelance projects while searching for the perfect F/T opportunity.
If you think we'd be a great fit, hit me up.

Transform Tool - Drag, Scale and Rotate in Flash at Runtime

On a recent project I created a Transform Tool similar to the one you might find in a typical CS3 application like Photoshop, Illustrator or Flash. Once you instantiate this tool and and assign it a target, you can easily scale, drag and rotate it around the Stage at runtime. Optional properties include a min and max scale value, a boundaries Rectangle object to constrain where the target can be dragged and custom scale and rotate handle icons that you can specify via a linked MovieClip in the library.

TransformTool

In a future version I will combine scale and rotate into one mode eliminating the need to select between them.

View the documentation here
View the source files here

Update 11/24/08 : There was a syntax bug that was confusing placement of the transform handles which subsequently was throwing the selected object off screen at times. This has been fixed.

Upload BitmapData Snapshot to Server in AS3

Here is a very simple wrapper class I wrote last night that allows you to take a BitmapData snapshot of a Display Object on the Stage, convert it to a .png or .jpg and upload it to your server in a directory you can specify at runtime. All in about 10 lines of code.

The technique is quite simple. You instantiate a new 'DynamicBitmap' and pass in the target DisplayObject you want to snapshot as well as a string of the filename you want to call it. e.g. 'MyBitmapSnapshot.png'

In the following example I created two buttons on the stage which snapshot and upload the bitmap separately however you can combine this all into one action if you like.

  1. private var _dbmp:DynamicBitmap;
  2. private var _uploadScript:String = 'uploads/upload.php';
  3. private var _uploadDirectory:String = 'images/'; // optional //
  4. private var _target; // some display object on the stage //
  5. private var _filename:String = 'myBitmapSnapshot.png';
  6.  
  7. public function ApplicationMain ()
  8. {
  9. snapshot_btn.addEventListener(MouseEvent.CLICK, takeSnapshot);
  10. upload_btn.addEventListener(MouseEvent.CLICK, uploadSnapshot);
  11. }
  12.  
  13. private function takeSnapshot(evt:MouseEvent):void
  14. {
  15. _dbmp = new DynamicBitmap(_target, _filename);
  16. }
  17.  
  18. private function uploadSnapshot(evt:MouseEvent):void
  19. {
  20. _dbmp.upload(_uploadscript, _directory);
  21. }

Underneath the _target DisplayObject is drawn into a BitmapData object and then based on the file extension you give it in the filename it is converted into either a JPEG or PNG byteArray using the AS3CoreLib encoding classes by Tinic Uro.

These encoding classes return a raw byteArray which by itself cannot be uploaded to the server as the MIME protocol requires precisely defined headers to accompany the raw image data and instruct the server what to do with it.

Enter the URLRequestWrapper class which is a slightly modified version of the UploadPostHelper class written by Jonathan Marston which adds in the necessary headers required by the server:

  1.  
  2. --pfhchaivbrmxhcighexxsspxpxhepeea
  3.  
  4. Content-Disposition: form-data; name="Filename"
  5.  
  6. myBitmapSnapshot.png
  7.  
  8. --pfhchaivbrmxhcighexxsspxpxhepeea
  9.  
  10. Content-Disposition: form-data; name="dir"
  11.  
  12. images/
  13.  
  14. --pfhchaivbrmxhcighexxsspxpxhepeea
  15.  
  16. Content-Disposition: form-data; name="Filedata"; filename="myBitmapSnapshot.png"
  17.  
  18. Content-Type: application/octet-stream
  19.  
  20. ‰PNG
  21.  

The URLRequestWrapper is simply a modified URLRequest with a data property that contains the image data and all the necessary headers required by the server, including the optional destination directory you specified for the image. When this URLRequest is loaded into a URLLoader object it arrives at the server via the global $_POST array.

I've included a simple upload script 'uploads.php' that looks for a 'dir' property in the header information which contains the _uploadDirectory variable you specified in Flash. It is entirely optional, if no directory is specified it will install the image in the default directory as specified in the upload.php script. This may prove handy in an application where the you'd like to be able to change the destination directory of the newly created image at runtime.

Note: If you specify a directory that does not exist on the server it will be created via the new recursive flag introduced in php5. Be sure to have php5 installed and enabled on your server or the script will throw an argument error and possibly not run.

Source Example Files Here

Top Five Things You Need to Know Before Driving Across The United States

On March 10th I flew one-way from Portland, Oregon to Charlotte, North Carolina to pick up my '97 Honda Civic and drive it 3700 miles back across America. My girlfriend Jennie accompanied me for half of the trip back to Lincoln, Nebraska where she had to pit stop to hustle up on getting her graduate degree at UNL.

Welcome To Oregon

Now safely back in Portland and reflecting on the experience, I have realized there are some immutable facts one must know before taking on the open road.

Top Five Things You Need to Know Before Driving Across America.

01. Maintain at least a half-tank of gas at all times.
America is BIG, very big, and there are huge empty pockets of nothingness with signs that announce 'No Services' at what might misleading seem like a safe pull-off from the interstate to re-fuel.

If you do not maintain at least a half tank of gas in your car at all times, you are asking for pain.

02. Check the Weather and Road Closures Report Daily.
Depending on the time of year you are traveling, the weather can change dramatically within a few hundred miles. On the morning I left Lincoln, NE heading west on I-80 I hit a road closure just past the Wyoming border that forced me to take a 300 mile detour south into Colorado and into a blizzard that almost stranded me atop the Rocky Mountains. While I'm usually all about the unexpected adventure, in this case I had a plane to catch in 48 hours back in Portland and was still 1500 miles away from the airport!

03. Plan your destinations in advance.
I used to be of the school "we'll figure it out when we get there" then I arrived in St. Louis and spent over two hours looking for a room that was less than $200 a night. Get a listing of hotels/motels/hostels that are in your price range and print out a map of their locations to bring with you. While it might seem tedious, the 20 minutes you spend now before you leave will save you hours of searching when you arrive in a city exhausted from having just driven hundreds of miles to get there.

04. Decide what you really want to see and what you can pass on.
It is impossible to get any real impression of a city by just staying the night there and getting coffee the next morning before you hit the road again. You'll think you'll have all this energy to explore, but trust me after you drive 5 hours to get there and have been on the road for a few days your ambition to explore wanes in favor of a drink and a hot shower. If you want to see a city and remember something about it, plan to stay at least one full day there by booking two nights of lodging before you leave town. We did exactly this in St. Louis and had a blast.

05. Pack a survival kit.
Again, this might seem overkill, but if you break down in a blizzard at 9,000 ft you'll be happy to have a few extra blankets to keep you company until help arrives. Also don't rely solely on AAA as I found that there were plenty of pockets along my drive where I didn't have cell-phone service (thanks to Sprint) so I wouldn't have been able to call them if needed.

The Essential Cross-Country Road Trip Survival Kit

  • Spare tire, jack, and tire iron to take off lug nuts
  • Road flares (available at most auto part stores for a dollar or so each)
  • A flashlight in case you breakdown at night
  • A real road atlas, not a $3.99 map of the US from 7-11
  • Sunglasses!
  • Snow chains that you've tested to fit your car.
  • A credit card that earns you points for gasoline purchases
  • $200 in emergency cash for the mechanic in Wyoming who doesn't take Amex.
  • A fifth of Jack Daniels (for the hotel room)
  • And a digital camera to remember it all.

xCountry Trip 2008

Bonus: Expense Recap of Entire Trip

  • One-Way Plane Ticket from Portland, OR - Charlotte, NC : $149
  • Cost to totally tune-up the car for the drive : $614
  • Gasoline (14 fill-ups) : $340
  • Hotel/Motel/Hostel Accommodations (total 4 nights) : $370
    The rest of the time we stayed w/ family and friends
  • Restaurants and Supermarkets : $590
  • Alcohol / Bars : $100
  • Random Fun, Misc Crap, etc.. $270

Total length of trip : 3 Weeks / 3700 Miles
Total cost of the whole sha-bang : $2433

Happy Travels!

I’m Taking Back Everything

The number one reason I quit my job was because I couldn’t stand how I was filling my days. There is nothing worse than looking at the clock at 6pm and asking yourself what just happened? Or worse yet, what the hell was the point of today?

It’s especially easy to have this happen to you during the winter months when there’s about 12 minutes of daylight to illuminate your soul. Instead of feeling productive and in control you find yourself mindlessly wandering through the day waiting for it to stop raining so you grovel down the street to suck on your lunch.

That is not the man my mother made me to be.

To avoid this trap of feeling like you’ve been living under Jacob’s Ladder it’s important to exercise. That is to rise from your sedentary position and move your feet and arms back and forth like so:

Utah Saints Something Good ‘08

Do it and trust me it just feels good.

Starting Over

Last friday I quit my job. and holy shit did it feel good!! And so now, once again, I saddle up on the bucking horse of self-employment wild eyed and excited about what the next year will bring.

Robert Overcracker jumps Niagara Falls on a jet-ski

I’m starting this blog of sorts to document this process as now, working for myself, I will once more have total control over my days allowing me to spend my time as I see fit. So in the spirit of experimentation, I intentionally come at this without a plan but to simply record and keep organized the various projects and conversations I will participate in over the next few months.

Furthermore expect colorful bitch sessions if I encounter any terrorists along the way.
Woot Woot! Go me!!

,

Cool Stuff of The Moment