Tag Archives: source code

How to use ExternalInterface to integrate AS3 with JavaScript

Here’s a quick snippet of code for setting up intercommunication between a SWF and JavaScript, using ExternalInterface:

InterServer Web Hosting and VPS
 

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

Webcam controlled motion

I started playing around a little more with my Webcam and extended my previous motion detection example – this time to control the camera of a virtual 3-D space from motion detected in the user’s Webcam. It detects motion area and general direction, albeit with dubious accuracy, but you get the idea.

Due to popular demand, I’ve posted the source code for you lot to play with. It contains the FlashDevelop project file (it’s compiled with the Flex 3 SDK) and my cut-down 3-D engine, Pants3D 🙂

Wii Paint

After getting my Wii remote hooked up with the WiiFlash Server, I knocked up this quick Flash demo which draws the blobs of infrared light the Wii remote detects (it can track up to 4 blobs at once), just like the Wii console’s sensitivity setting dialog does. I just gave each blob a different colour and clear the graphics on pressing the ‘A’ button.

Here’s the code to get it working – requires WiiFlash Server: