Sacramento, CA

Sunny 100° | 60°

Seattle, WA

Partly Cloudy 76° | 58°

Buk Life

Posts Tagged ‘Actionscript’

16 October 2009

Virtual 3D Flickr Window

Headtracking Screen Shot
Recently, a port of OpenCV, a library of object detection functions, was created for AS3 which has sparked a lot of interest and creativity in the flash and flex community. Stemming from this came facial recognition for AS3.

It is often difficult to find useful applications for these new technologies. Luckily, BKWLD was recently approached by .net magazine and was asked to write 2 articles. Jeff Toll, who’s article can be seen in this month’s issue, worked with me to come up with a design for a facial recognition application that will be featured in an upcoming issue of .net magazine. Together we came up with an idea for a virtual window, where the users can essentially fly through a 3D flickr gallery.

For the true experience you can visit the following link (you must have a web cam): http://bkwld.com/headtracking/. If you do not have a web cam, I have uploaded a demo video onto Vimeo at the following link: http://vimeo.com/7092048.

Here is the source if your feeling adventurous.
HeadTracking.zip

There are a couple things to note about the source code. First, this was developed using flex, so if you want use it in flash you will have to set HeadTracking.as as your document class. Second, I did not leave my Flickr API key in the source for obvious reasons. So, you will have to apply for a Flickr API key if you don’t already have one and enter it in the init function of the HeadTracking.as class file where it says “Enter your API key here”. If you find any errors in the source code be sure to yell at me in comments.

The following resources were used:
http://www.squidder.com/2009/02/26/realtime-face-detection-in-flash/
http://www.quasimondo.com/archives/000687.php
http://www.youtube.com/watch?v=Jd3-eiid-Uw

24 June 2009

Top 10 Resources for ActionScript Development

ActionScript is awesome, but developing with it can be tedious. I have compiled a list of 10 resources that I use on a daily basis to help speed up development. I have purposely not included any animation, 3D or physics frameworks because there are far too many to include in a top ten list. If you have any that I didn’t include, feel free to post them. So here we go, listed in no specific order.

Monster Debugger
I’m loving this new debugger. It’s very easy to include in your code and it even has live editing! Moving that sprite over a couple pixels has never been easier.

Degrafa
I’ve been using this a lot lately. If you are doing any skinning in Flex you’re crazy if you aren’t using Degrafa.

Actionscript 3.0 TextMate Bundle
Here at BKWLD we LOVE TextMate. Although I still use Flex while developing with the Flex framework, I use TextMate for all of my Flash projects. The AS3 bundle makes Flash Development a breeze. Imagine being able to create a class file with the constructor, package declaration and custom class comments already there. At BKWLD we have taken it a step further by creating a huge list of custom snippets and templates that work with our AS3 library.

Pure MVC
While there are many great AS3 frameworks out there, this one is my choice. There are better solutions out there as far as frameworks for Flex development go, but the beauty about Pure MVC is that it is compatible with both Flash and Flex.

Flash Tracer
I use this thing all the time! It’s a Firefox add on that enables you to see all the output generated by any running flash swf, even the ones in your browser. It works great for debugging live content. Also, you get to see all the curse words that other developers have “accidentally” left in their trace calls.

Firefox Web Developer Toolbar
Every web developer who uses Firefox should have this. I mainly use it to test various screen sizes with liquid flash layouts.

Flash Player 10 Debugger
An absolute must have for any flash developer. Make sure you have the debugger version and not just the regular flash player.

Tour de Flex
This is really nice Flex component inspector that also allows you to quickly view the documentation of any component you are looking at.

Losum Ipsum Widget
Quick, randomly generated lines of lorum ispum text.

SQLite Admin
A quick and simple tool that allows you to view the structure of any SQLite database and execute queries. This is a great tool for anyone who is developing for AIR.

21 May 2009

Star Trek + AS3 + AIR = Awesome!

thumbphp

Visual effects studio OOOii was given the opportunity to create the visual interfaces for JJ Abrams new Star Trek movie. Typically, this is all done in post production and the actors have to pretend they are interacting with a super computer from the future. However, with the power of Flash and AIR, OOOii created numerous interfaces allowing the actors to interact in real time with actual working applications during many of the films scenes. Read more about it on Lee Brimelow’s Flash Blog.

27 December 2007

Straighten quotes in textmate

One thing I missed from BBedit was straightening quotes. Just found these great commands that do the same thing.

2 One thing I missed from BBedit was straightening quotes. Just found these great commands that do the same thing. Robert Reinhard,CTO

December 27th, 2007 at 03:41 PM
Posted By: Robert Reinhard in Development

18 December 2007

Custom components in AS3 = dead

I’m pretty sure that making custom components in AS3 is worthless now. It was already kinda shaky in flash 8 and the documentation lacking. Check out this example of where I’m running up against a wall:


package {

	//imports
	import flash.display.*;
	import flash.events.*;

	//class
	public class Module extends Sprite {

		//component property
		[Inspectable] public var label:String;

		//constructor
		public function Module() {
			trace(label);
			addEventListener(MouseEvent.ON_CLICK, clicked);
		}

		//click event
		private function clicked(e:MouseEvent) {
			trace(label);
		}
	}
}

In this example, you create a simple sprite (the shape of which isn’t set here) that has a label property that you should be able to edit in the authoring environment. After adding it as a component in the library and editing the “label” field in the component inspector, publish. The first trace, in the constructor, will output null. It’s not set yet. But once you click on it you see the label you’ve given it. So, it is storing the input from the component inspector. However, flash AS3 doesn’t seem to provide a “creationComplete” event like Flex does. So you can’t tell at what point your properties were set.