Well today I had a play at making a Flash game for the Wii using some rudimentary gesture recognition for the wand style of input. You can see a sneak peek of how the gesture recognition works here:


So Aral and Mario together have un-earthed some real gems the last couple of days, I think there could be a lot of fun to be had making some Wii games. It’s like Flash Lite, even simple games are much more fun when put on another type of device, and with the “wand” style input, it’s even more fun.

Anyway, here is my first example, will be uploading source for this when I get back from France in a weeks time. Just visit the following on your Wii (or desktop computer if you don’t have one)…


This is just a quick stab, I’d like to take some time to make it more responsive, I’m just using the 10×10 grid for pattern recognition, without up/downscaling user gestures, so it will be quite inaccurate on occasion, although it is possible to get used to how the game wants you to “gesture”, so it is possible to get good (beat my top score of 1800).

balloons wii

For best results, you must make the gesture (circle, slash or backslash) across the whole Flash movie, i.e. from one corner to another for the slashes, or reasonably large with the circle gesture).

Friends of ED is holding a competition where you could grab the top prize of an Apple Mac Book, 3 FoED books, Camtasia and SnagIT software and a copy of gProject (from gskinner.com). There are also runners up prizes so it’s worth having some fun here.

You just need to produce something cool that uses some of the provided assets, it looks pretty open to interpretation, just stick to the rules of coming under 2.5 minutes and 10mb.

Join in here.

Scott, Weyert and I are going to be having a Flash Lite Webinar in February, and we’d like your feedback on what you’d like to hear what you’d like to see covered.

To get you started, we have a have a selection of topics listed in the chapter listing (PDF) for the new book, but we’d also like to know whether there is any part of Flash Lite 1.1 or Flash Lite 2.X development that you’d like to hear a bit more about, and whether you’d like to keep things simple, more advanced, or a mixture of the two.

Please drop your comments at the end of this post. All suggestions welcomed.


I’m going to keep this very factual. I’ve been developing Flash for the last 6 years and intend to carry on doing so, as a result I’ve learned to accept a lot of criticism and be open to review all things new, in effect I’m opening by saying I have not been “bought” as you will no doubt see in this article I aim to give an entirely balanced perspective, the politics interest me not, just the tech. With that in mind, I’ve been able to get very deep into WPF/E for the last week or so, I’ve always enjoyed dipping into a brand new tech and getting fully engrossed in it, so it was a nice experience to be given the opportunity (thanks). You may find me making a lot of comparisons to Flash, this is only natural for obvious reasons.

Ok let’s start with what it is. It’s a browser plug-in for Mac and PC browsers that displays graphics and animations written in XAML, an XML based markup language. To add interactivity and logic, right now you must use JavaScript, and you write that in a typically DHTML way with functions like wpfe.findName() being akin to document.getElementById(). At present the relationship between your markup and JavaScript is achieved by writing the names of javascript functions in your XAML event attributes, for example when an animation completes, or when the user rolls over an element. XAML is the one thing that links WPF/E (codename) with WPF (part of .NET3 and Windows Vista) at present.

The Technology:

Ok so I read online MXML looks like XAML. There’s quite a difference here. You can think of XAML more in the vein of SVG with SMIL and interactivity. It is not compiled into a binary, it is indexable in the page by Google if you link to it, or embed it directly in your XHTML page for example. So that leads to both problems and benefits when compared to SWF, it totally depends on the type of content you are creating. It can mean incredibly large files, something that zipping might help, it also means it can be easily generated by a server, and doesn’t then need to be compiled before it is viewed. It also makes things like frame based animation difficult, something that binary can do quite efficiently. So points on both sides there.

So that is the presentation layer. Now the logic. You use JavaScript. When I found this out my heart sank a little. Flash developers can be (and I am included here), complete snobs, since we’ve had a fairly decent language since AS2, with AS3 we have a language to envy, and JavaScript hasn’t really changed much over the years, it is stuck at about an ActionScript 0.9 level, in terms of how you have to go about programming with OO in mind, scope chain lookups and the list can go on. I’ve been lurking around the AJAX developer communities and I am sometimes in awe of how rudimentary the majority of the code is. I imagine there is a going to be a BIG sigh of relief when JavaScript 2.0 proliferates, and rightly so. Still having said this, developing with JavaScript wasn’t quite so bad, you can see some of my source later, there are thing you can do to organise yourself a little better, even if you don’t have real packages and so on.


So here are some examples I’ve worked on this week. I’ve also worked up a small library of classes that are useful in not only WPF/E development, but also in JavasScript development in general, for example EventDispatcher, Delegate, and XmlHttpRequestHelper which turns the rather naff XMLHTTPRequest object which AJAX folk love, and makes it into something like LoadVars/XML in AS1 without the XML parsing abilities etc, you still can’t get progress out of it though, nonetheless it removes some headaches. I’ve included full source with all these examples.


You’ll also notice that on that page I’ve included a couple of techniques that I’ve picked up over the week.


This is the real tough one. How can a product that is not even yet 1.0 compete with a product that has been around for 10 years – they’d have to prise Flash from the developers’ cold dead hands on the most part. This is key when doing the inevitable and comparing it to Flash, just what is the hard sell that will make me use it over Flash right now – maybe nothing for a lot of people at least with v1. I do see a lot of potential in WPF/E, however, so I should explain this… When Nintendo released the DS and Wii, they had to compete in a world where Playstation and XBox owned all, they simply could not compete in graphical prowess and hardcore budgets, so they didn’t, they found a new market in terms of the price point and concentrated on their strengths, the Wii actually re-inventing gaming. So with that analogy in mind, you would be crazy to battle against Flash in the short-term, you need something more tangible…

It is crystal clear that MS are targeting AJAX developers, giving them the tools they want without them having to learn ActionScript or Flash, they are also targeting to some extent two other groups. Designers are key, the Blend and Design tools are being made with these people in mind, I think this is a very tough market to grab, but competition (and of course integration) between the tools of the various proprietors is to be welcomed. The final market is quite obviously people who are already using Windows Media Video, particularly live streaming (i.e. the *other* end of the online video market). These people traditionally use an embedded Windows Media Player in the HTML page which is pretty awful. I heard someone say that if WPF/E means they can make a nice video player for their content, the rest is a bonus.

It is always a time for predictions as we reach the end of a year. So for me 2007 will no doubt see the clash of several new web technologies, maybe the revival of some that have laid low (Java), but all in all this is best for people like you or me who are not afraid of learning something new and bolstering old skills. I’d also like to say goodbye to differentiating between whether something is made in AJAX or Flash, and even if something is a web app, RIA, or desktop application, separating these things into groups is done by people with legacy mind sets, and is a sure way to slow down the rate of advancement in the field of computing. I hope you find the examples and information presented here useful.

It’s been a week since I was at Flash on the Beach but whilst I was there Rami Tzabar from the BBC (Digital Planet on Radio 4) asked me a few questions about Flash Lite just after my presentation. You can listen online and download the podcast at:


Direct link to mp3

Skip to 20 mins 30 seconds for the piece on 10 years of Flash (and Flash on the Beach). The show talks about the evolution of Flash and its expansion into various forms of media. There’s also an insightful discussion from Geoff Stearns on the abuse of Flash. 10 years, wow.

Although I didn’t have time to prepare, the message is that Flash Lite is an enabling technology that fills a gap in the market, not just competing with an existing product.

Now that the site is live for our book on Flash Lite (thanks to Scott) I’d also like to take the chance to point you to one of the chapters I wrote which is online for free download, available immediately:

Visit the page (PDF on the right)

This chapter contains a variety of concepts involved with game programming on limited devices; including math, physics, collision detection, keypad input, graphics and sound.

If you enjoy this chapter, please feel free to order a copy from the good people at Friends of ED.

Finally got round to uploading my slides, source and the source for the FOTB Flash Lite Pocket Guide, so my apologies for the delay… I had to take a flight straight from Brighton to Seattle on the last day of the conference and it’s been pretty busy since I arrived. I also want to take this chance to thank John, as many others have. It was a fantastic conference and extremely slick, I hope he invites me back next time. Without further ado, here are the zips!

FOTB 06 Complete.zip

If anyone is around Seattle/Redmond in the next couple of weeks and fancies a beer, I’m here till the 22nd so please drop me a comment. I still can’t believe how everything manages to be 3 times larger and half the price, how upsetting. :p

I’m pleased to finally announce the Flash Lite Pocket Guide for Flash on the Beach 2006. I had some problems embedding so many images and a large amount of XML parsing required for something like an event guide in Flash Lite 2, the RAM limitation is something you never totally get used to, but on the flip side I believe that limitations can lead to happiness. There are several tricks and tips required to get this working well, but after some effort here we have it:

SIS Installer (alternatively http://tinyurl.com/y9rsxn)

Zipped up SWF+XML

I’ll be uploading the source for this. It is an AS2 Flash Lite 2 project so if you are a Flash Lite 1.1 developer/designer at present, you can see some of the benefits AS2 gives you when creating your mobile apps.

If you are at Flash on the Beach, please do come along to my session on Flash Lite 2 Tuesday at 4:30 in the Corn Exchange.

If you have trouble installing the file, you may like to take a look here.

A while ago I posted about casting failing if you cast the result of attachMovie() but only in certain cases.

I had the same thing happen today, so I opened it up in FLASM, and I think I can see what is happening:

push 'sp'
push 'sb', 0.0, 'getNextHighestDepth'
push 'sb', 'com'
push 'domain'
push 'controls'
push 'ScrollBar'
push 'LINKAGE'
push 3, 'attachMovie'
push 1, 'com'
push 'domain'
push 'controls'
push 'ScrollBar'

As you can see here, it seems instead of performing a cast operation (and “cast” is a keyword you do see in the FLASM output), it actually tries to perform a conversion (as you see with Array or Boolean), treating com.domain.controls.ScrollPane as a function, and applying it to the result from the attachMovie() operation. This results in the undefined/null value we are experiencing because in itself, this function has no return value unless used with the new keyword as a constructor.

As I stated in the previous post on this subject, splitting the code onto two lines seems to fix the problem (i.e. attachMovie() then cast on the next line). Is this a compiler bug? Has anyone more experience with the inner workings of the Flash Player? Why do Macromedia’s v2 components not suffer this, I have a feeling it is to do with the inline dynamic dereferencing, maybe #initclip needs to be brought in for AS2?

Well I’ve seen Tink’s and Peter’s wishlists, so I think it’s time I put up my own, and this was really tricky, too many sessions I’m going to have to sacrifice.

Day 1:

11:00 Craig Swann – ..and now for something completely different..

13:30 Branden Hall – Explorations with ActionScript 3

15:00 Aral Balkan – Memo to the CEO

16:30 Erik Natzke – Keep Interest(ed)

Day 2:

9:30 Brendan Dawes – Contains one scene of sheep skinning

11:00 Joey Lott – ActionScript 3.0 Design Patterns

13:30 Rich Shupe – Vecmaps and Bitters

15:00 Keith Peters – ActionScript 3.0 for Animation

16:30 Richard Leggett – Flash Lite 2 (I’ll kill me if I don’t go)

Day 3:

09:30 Geoff Stearns – Flash in a Web 2.0 world

11:00 Sascha Wolter – Enterprise Flash

13:30 Hoss Gifford – Creative Evolution: Behind the Scenes

15:00 Chris Curzon – Artificially Intelligent Actionscript

16:30 Mario Klingemann – Mashup Baby!

In other news, there is going to be a Flash Lite guide for FOTB so you can keep track of what is happening, plus a couple of suprise extras. Keep an eye on this blog in the next week.

Things are really hotting up now, excitement levels are running high, so see you there!