2009


23
Aug 09

How to use ExternalInterface to integrate AS3 with JavaScript

Here's a quick snippet of code for integrating your SWFs with JavaScript, using ExternalInterface:

import flash.external.ExternalInterface;

// Calling a JavaScript function from AS3 (with optional parameters)
if (ExternalInterface.available) ExternalInterface.call("javascriptFunction", param1, param2);

// Implementing a JavaScript callback in AS3 (flashFunction is called when JavaScript calls javascriptFunction)
if (ExternalInterface.available) ExternalInterface.addCallback("javascriptFunction", flashFunction);


16
Jul 09

Back from Turkey

Hot air balloon over Cappadoccia, TurkeyI just got back from a couple of weeks exploring Turkey. Living on kebabs and melting in up to 40 degree heat was the challenging kind of fun and I managed to see pretty much all of western Turkey in an exhausting 4000km road trip. I also got to ride a hot air balloon through the valleys of Cappadoccia, which was pretty damn cool!


23
Jun 09

Webcam spherize

I cobbled this webcam demo together for no other reason than creative curiosity - a half of mirrors for the information age, I guess - source


20
Jun 09

Head tracking in 3D

I started trying to find useful things to do with face detection, but with limited success. I tried using the Libspark Haar Cascades implementation of face detection with Papervision3D to create a sort of head tracking effect, but it's a little flaky - partly because of poor tracking accuracy and partly because it's too CPU intensive. You can view it on its own page here.


18
Jun 09

Synchronising animation across multiple SWFs

I've been asked a few times now to create effects that require multiple instances of the Flash Player on a page to interact and remain in sync - even with interaction. Because of this, using timed events is no good and because of harddrive thrashing (which I won't do for what might just be some banners) you can't use Flash cookie updates. Also, when you have more than 2 SWFs, deciding which SWF updates who becomes tricky. I came up with this solution, using LocalConnection with a twist, which works pretty well - but if anyone has a better method, drop it in a comment :)


17
Jun 09

Terminator Salvation online game

I just found this online multiplayer Flash game for Terminator Salvation. Multiuser Flash games have come a long way since I built Dinky Bomb all those years ago. The graphics are very impressive and overall I'm really impressed, though the gameplay is perhaps a little awkward. Essentially though, the best genre of multuser game for Flash seems still to be strategy over all-out action. Maybe the introduction of UDP and binary sockets to Flash 10 will change that.

Terminator Salvation online game


10
Jun 09

Multitouch for the masses

Just spotted a video on James Alliban's blog of how to make your own cheap multitouch table. It's a lot easier if you're not initially bothered with projecting your image back into the table - otherwise you'll need a projector (which I don't have) and a camera capable of infrared (which some webcams may already do without requiring modification). I for one, will be having a go...


3
Jun 09

How Wonderfl

I've been playing around a little with the online Flash building tool, Wonderfl. If you haven't seen it already, I urge you to create an account and have a go. You can browse the weird things that people have created, fork other users' code, or write you own from scratch and see the results compiled online in realtime. It's a great way to learn graphics coding in AS3 I reckon.

Wonderfl