Thursday, December 11, 2008

Google Native Client

OR Changing the web one press release at a time

Google have released a new experimental browser plugin called Native Client that allows embedded application to interact with the operating system. Traditionally browser to OS interaction has been severely constrained for security reasons. Plugins that have attempting to provide more options for interaction have proven to be highly insecure. ActiveX attempted to do this by allowing the user to decide what plugins it trusted but users are generally poorly positioned to make these sorts of decisions. Google's Native Client plugin aims to provide secure interaction by identifying trusted modules for interfacing with the OS. I'm guessing that Google will be making the decisions about what modules can and can't be trusted. The up side is that you can develop an application and know that it will be as secure as the trusted module that is doing the work for you.

A nice feature of this system is that existing applications can apparently be quickly compiled to work with a minimal number of changes:

"As a test, Google ported an H.264 encoder that is about 11,000 lines of conventional C code. To get the encoder to compile and run in Native Client, they only had to add approximately 20 lines of code and modify the Makefile. The resulting binaries are completely portable and can run without requiring recompilation on any operating system supported by the Native Client. "
Safer than ActiveX: a look at Google's Native Client plugin

It's not hard to see that this has the potential to transform the internet (not that old chestnut again). Especially when it's combined with Google's Chrome browser and the growing popularity of Google apps.

Tuesday, November 18, 2008

Web Developer IDE's

Like a very large percentage of the worlds web developers I've been using Dreamweaver as my main Developer IDE for many years. Recently I've started to do some of my web development in Eclipse due to some handy Javascript and PHP plugins. But I still go back to Dreamweaver for CSS and FTP ( there is a plugin for enabling FTP in Eclipse but it needs more time and patience than I have to install all the dependancies). Really I'd prefer to have one application open rather than two so I'm always on the look out for alternative. Consequently, my radar went up when I saw a post comparing Komoda Vs Coda. I'd never heard of either so I started hunting around :

Sunday, October 26, 2008

Flash NumericStepper : Setting the Background Color

Have you ever wanted to customize the appearance of the NumericStepper component in Flash (it's pretty easy in Flex). Specifically I wanted to change the color of the text input area. Looking at the NumericStepper class there is some mention of the upSkin and I tried setting this the way I would normally set a button upSkin but with no effect. So I started looking into how the component is constructed. It shouldn't surprise you to find out that the text in the NumericStepper uses the TextInput component. You can get a reference to this object by using the NumericStepper textField property. The next problem is that the TextInput component offers no direct way to change it's background. It turns out that TextInput uses a TextField to display it's text. You can get a reference to this object using the TextInputs textField property. Consequently to change the background color of a NumericStepper's text you need to access it's textFields textField. It looks like this:

myStepper.textField.textField.background = true;
myStepper.textField.textField.backgroundColor = 0x0F1A2F;

What makes this confusing for me is that the first textField returns a reference to a TextInput and then the second textField returns a reference to a TextField. There may be an easier way to do this and I hope to hear what it is. Perhaps I'm missing something regarding upSkin?

Thursday, October 16, 2008

Perpetual Motion : My New Game

Perpetual Motion Singapore

A few days ago we (myself and the nice people over at published my latest game : Perpetual Motion. This new game has much in common with my first physics based game : Wheel of Death. In Wheel Of Death you had to arrange props to get the wheel to the goal. Walls, bus and various other obstacles provided variety to the levels. Box2D was used as the physics engine to allow some realistic collision and physics. While I was developing Wheel Of Death I regularly found I was more interested in building perpetual machines with the available props than I was in completing the levels. By perpetual machines I mean a combination of props that cause the wheel to cycle for an indefinite period. It seemed to me at the time that it would be simple enough to "quickly" build this new game as it used much of the engine from the original. To be honest much of the engine from Wheel of Death remains unchanged except for a few enhancements to make it more reliable but as I became more interested in the concept I started to invest more time in refining the user experience (dialog transitions, a world map with each location having a unique landmark and a different background) and introducing instructional elements (numbers to show the sequence of prop interaction). Getting a meaningful scoring mechanism was probably one of the biggest challenges and from the comments on Kongregate I don't think I went far enough in explaining the scoring system. Still I feel Perpetual Motion is a real leap forward from my first game. I hope you enjoy playing it.

Wednesday, October 01, 2008

OzFlex October Meeting : Andrew Spaulding presents CS4

If you didn't make it to last weeks launch of Adobe Creative Suite 4 then you might be interested in joining Adobe's Andrew Spaulding as he presents an "exciting, fast‑paced, developer focused session on Adobe’s latest line‑up of their flagship Creative Suite products, and how they interface with Flex & AIR". This event will be hosted as part of OxFlex's October meetup and will take place at Melbournes Loop Bar from 6.30 PM on Monday 13 October (more details).

Thursday, September 25, 2008

Melbourne CS4 Launch Debrief

I've just left the Melbourne Adobe Creative Suite 4 launch. I have to say I'm a bit surprised. It was unlike any product launch I've been to in the past. Essentially it was a half hour tour of the top new features followed by an open bar. Some were disappointed by the brevity of the presentation hoping for a more detailed overview of the release. Personally it seemed a clever idea. Everyone there was web savvy enough to go hoem and look up the features that caught their eye and at the end of the day you only need one killer feature that saves you enough time between release cycles (about 18 months?) to justify upgrading. For graphic designers I imagine having multiple artboards in a single Illustrator file could be enough to justify the upgrade. For web developers Fireworks ability to export standards friendly CSS (surely that is too good to be true) or Dreamweaver's many workflow improvements may clinch the deal. For Flash developers the killer feature is less clear. Inverse kinematics and 3D transforms will probably be a selling point for animators. Both of these features will be useful for programmers but hardly killer features. The improved integration with Flex (while not featured during the launch) will definitely be of interest to this group. I was most interested in a feature in Premiere and Soundbooth that was able to create transcriptions from the media audio. This transcript could then be included into the video as metadata with Premiere outputing a player with search capabilities (i.e jump to the point in the video where a word or phrase appear). There were options to customize the size of the text chunks and to choose Australian English (or Korean, or Japanese etc) as the basis for the transcription. Soundbooth was also able to export the transcription as xml (TimedText I think) which will be really useful for creating closed captions in Flash. If this works even half way then it will be of enormous benefit to anyone trying to achieve basic accessibility standards.

Wednesday, September 10, 2008

Google Homepage Word Count and SEO

Marissa Mayer is one of the people responsible for the Google homepage and I just discovered a fascinating post from her on the Official Google Blog. It seems that a series of emails lead Marissa to become very aware of the number of words that Google uses on it's homepage. This lead them to adopt a 28 word policy. That means they use no more than 28 words on the basic Google homepage. Therefore when they decided to add a link to their Privacy page then '©2008 Google' dropped the Google to become '©2008'.

One of the reasons for Google's success is the simplicity of it's homepage and so you might wonder why more people don't copy this approach. It's more than a little ironic that the answer is SEO (Search Engine Optimisation). Google determines a pages page rank by 'reading' the content of the page and looking at what pages link to (and from) that page. Therefore having more relevant text and links on your homepage has the potential to increase your page rank and therefore make your site easier to find on Google. So Google has less words on it's home page so more people will use it to find your site and you must have more words on your home page so Google will let people find it.

Monday, September 08, 2008

Adobe CS4 Features

Early last week the news emerged of a Adobe special event in late September. The invites were quite secretive but by the end of the week the news was out that this was a "launch" event for Creative Suite 4. Details of the new release are still under wraps but there have been a number of sneak peaks and lab releases offering some insight into this upcoming release. I'd like to claim I've done a whole lot of research and put together a compilation of all the new features that have been previewed but in the course of this research I happened across a page on Wikipedia where the work had been done. Also worth a look is a YouTube video showing some new Photoshop features. A post from Flash Magazine showing Flash features demoed at this years WebDU. A four part series on Community MX highlighting new features from the Fireworks beta. Flashmech has posted a good review of the new Dreamweaver features. You can also download and try the Dreamweaver and Fireworks betas from Adobe Labs.

Tuesday, August 19, 2008

Silverlight : the Pro's and Con's

Tim Anderson from The Register has posted one of the best Silverlight overviews to date. In "Microsoft Silverlight: 10 reasons to love it, 10 reasons to hate it" he provides a clear, factual and common sense approach to assessing the value of Silverlight.

There is also an older post "Adobe AIR: 10 reasons to love it, 10 reasons to hate it" that you might want to take a look at while you are there.

Thursday, August 07, 2008

Cairngorm : Makes a few announcements

There has been no shortage of discussion about Cairngorm over the last twelve months. In particular there has been a lot of discussion comparing Cairngorm with the other Flex frameworks that have been, and continue to emerge. But there has been surprisingly few announcements from the Cairngorm team. That all changed yesterday with a lengthy posting by both Alistair Mcleod and Steven Webster. The raw essence of both of these posts is that Cairngorm public face has moved to Adobe Open Source with all the support features that entails (community forums, source code available in a subversion repository, a JIRA bugbase for logging bugs and feature requests). There was also mention of plans for Cairngorm 3 but there were no hints ta how far away that might be. What was most interesting was that both posts read almost like a manifesto, a statement of their philosophy. At no point did they directly respond to Cairngorms quite vocal critics but there were a number of assertion of principles that indirectly dealt with some of these criticisms. The following comment from Steven Webster is quite telling :

"Blog posts that " is evil", " is bad", " sucks" certainly catch a great deal of fleeting attention, but I don't believe that investing our limited time and energy in these debates is the most effective way of advancing the state of our art."

Some other quotes of interest :

Alistair McLeod :

"At Adobe Consulting, we've always had a minimalist approach to Cairngorm; we don't want to add feature for feature sake, add functionality that doesn't belong within an architectural framework, or introduce another design pattern into the mix because it's the latest fad in the software industry. The framework is there to allow us to build well-architected software solutions, and we've only ever added features we truly believe helps us do that."

Steven Webster:

"We have no desire to convolute the framework, to introduce abstraction, or to discourage the use of idioms or techniques specific to Flex, in order that we might create applications that could be ported to other presentation-tier technologies."

"We wish for Cairngorm to encourage best-practice leverage of underlying Flex features, and we are keen to ensure that we never add something to Cairngorm that is better suited to the underlying Flex SDK."

"One of the things we'll look to lock down as we go forward from here, is a simple charter by which we measure suggestions; this has been very implicit and shared understanding amongst the Adobe Consulting team, but we need to document and agree this with the community as we go forward. But in essence, it's as important to decide what Cairngorm is, as well as what it isn't, both now and in the future."

Wednesday, July 23, 2008

Frameworks : Cairngorn, Mate, Swiz & Gaia

Just a quick post to share a couple of useful and interesting recent posts relating to Flex Frameworks. First up Andrew Powell has written a big picture overview comparing Cairngorn, Mate and Swiz. He notes :

"I think that Cairngorm will make more sense to developers coming from the Java world. Developers coming to Flex from ColdFusion would probably be much more comfortable in Mate, due to its tag-based nature. Does this mean that any one is more right for you than another? No. As with anything else in this field, it depends on the task, the developer's skill and comfort levels with different technologies, and the time you have to learn something new."

Secondly, "calm in the chaos" has written a few insights into their experience using Gaia. At one points he says :

"In essence it’s a Framework that takes a lot of the leg work out of creating page based Flash sites. By Page based I mean sites that have a fairly standard navigation hierarchy. It can be used for more complex projects, though I found I struggled against the Framework more than it helped me some of the time."

Friday, July 18, 2008

Drupal Services & Flex

A current project at work is integrating Drupal & Flex together. There are a number of benefits to using these systems together. For me the main one is that you can offer the usability richness that Flex allows and the accessibility that standards based CMS's like Drupal offer without a lot of extra work.

The Drupal modules that make this possible are Services and AMFPHP. With these two modules enabled you get login and node access/saving functionality as a RemoteObject service in Flex. The other nice thing is that any Views (essentially UI developed queries for Drupal newbies) you define are also available as a Service. You can also develop additional Services utilising all the functionality Drupal has to offer. Finally, all these Services can be tested in the Drupal interface.

From that you can probably guess that I'm pretty enthusiastic about Drupal/Flex integration. But I have a caveat. We actually had a problem getting the Node and View Services to work. We kept getting a RangeError fault when trying to access these services. We finally found a workaround but we haven't had time to find the source of the problem. The workaround involves defining the fields you want returned as an array and passing it to these Services. Within the Drupal interface the fields parameter is optional and you get all the results you'd expect with or without it. But as soon as you add Flex to the equation you get an error. I assume it has something to do with the AMFPHP module as the Drupal Services page doesn't require AMFPHP but Flex does. I've posted this in the AMFPHP module issues and if you find a better solution that's probably a good place to post your discoveries.

I first heard about Services from a Friends of Ed book "Advanced Flex Application Development". My response to the book was mixed but it definitively got me thinking about Drupal Flex integration. Below are some links that proved useful getting this up and running:

Wednesday, July 16, 2008

Gumbo (Flex 4) goes beta

Adobe has just released a beta version of Gumbo, the next version of Flex. Gumbo is being developed around three primary themes:

Design in Mind
provide a framework meant for continuous collaboration between designer and developer
Developer Productivity
improve compiler performance and add productivity enhancements to language features like data binding
Framework Evolution
take advantage of new Flash Player capabilities and add features required by common use-cases

Improvements include :

  • enhanced states syntax
  • revamped component architecture
  • FXG : Adobe’s new graphics interchange format. "FXG is a defined subset of MXML...Most skin classes in the Gumbo framework are MXML documents which primarily use FXG tags to describe the visual appearance of Gumbo components."

These improvements are at least in part aimed at laying a foundation for integration with Thermo; a new designer focussed tool aiming to simplify the workflow from design to finished application.

For a good overview of Gumbo you should take a look at Matt Chotin's presentation. ScaleNine has a good summary of the design related changes and Ely Greenfileds video (below) provides an excellent introduction to skinning components using FXG.

Tuesday, July 15, 2008

Google and Radiohead's House of Cards

Radiohead and Google have released a clip of "House of Cards" that uses no cameras or lights. The clip consists entirely of 3D data created using Geometric Informatics and Velodyne LIDAR. "Geometric Informatics scanning systems produce structured light to capture 3D images at close proximity, while a Velodyne Lidar system that uses multiple lasers is used to capture large environments such as landscapes. In this video, 64 lasers rotating and shooting in a 360degree radius 900 times per minute produced all the exterior scenes." They have also released an interactive version of the clip that uses the Flash player to allows you to pan and zoom the clips data. The technology was managed by Aaron Koblin. It's worth a visit to his site to see art works he created using the flight patterns of birds.

Wednesday, June 18, 2008

Adobe Cards

A friend just sent a link to one of the most exceptional Flash animations I've seen in a few years. It's a promotional site for Adobe Creative Suite and involves playing cards and a lot of hard work. Check it out (wait until the loader reaches the end and then pull the red slider all the way to the right ) :

Wednesday, June 11, 2008

Ted On Thermo

Ted Patrick has published 5 screenshots of a development version of Adobe Thermo (probably) running on Mac OS X. Thermo aims to bridge the Flex development gap between designers and developers. Providing a GUI for telling Thermo how to deal with graphics from their designs. For example, the 3rd screenshot shows a horizontal bar being converted to a scrollbar. The idea as I understand it that the code Thermo generates can be sent to Flex Builder and back again. Allowing designers and developers to work on the same tools in environments customised to their needs. After seeing some videos of Thermo from last years Chicago MAX our design team were very excited. But there hasn't been much information to go on since that tantilising demo; until now. Hopefully this means we might see a beta on labs in the not too distant future.

Tuesday, May 27, 2008

Heading Structure and Google = Irony

I've been sitting here researching accepted practice for structuring your page headings.  What prompted this review is an SEO (Search Engine optimization) report for a clients site which suggests we remove the H1 element from the site title on all pages below the index page to improve page ranking.  There seems to be a lot of conflicting views on this and if you would like to get a feel for them and the issues involved I'd recommend reading "The Hard Facts About Heading Structure"; the comments are particularly useful. 

As a consequence of reading this (and many other articles) I found myself looking at all the article pages to see how they were actually structured.  For example, you'll notice that the page containing that article uses a H1 for the Sitepoint title and for the article heading.  Which seems a fair way to go to me.

Of course, all of this research is about SEO and all SEO is about getting a better page ranking in Google.  Consequently I decided to see how Google structures it's search pages and, you know, I got a bit of a shock. uses no headings at all either on the entry page or the results page.  The very pages everyone is desperate to be mentioned on.  The very page that everyone is sweating over their heading structure for is the page that has none at all.  If Google was dependent on getting indexed based on semantic structure it would probably have a very poor page rank.  Does that seem ironic to you?
Blogged with the Flock Browser

Saturday, May 24, 2008

Flash CS3 with MacbookPro = Very Slow

A few weeks ago my old Windows laptop suddenly went into a blue screen nose dive from which it never recovered.  Given the choice between a Vista based laptop and a Macbook Pro the choice seemed obvious.  But during the week I finally had a chance to return to a Flash  game I'm developing.  There were a few missing font issues due to differences between Mac and PC standard fonts but that didn't take long to sort out.  So finally I'm testing my physcis based game for the first time on my Mac and it runs like a dog.  It ran real smooth on my crappy old PC and it runs real smooth when I run it in the browser.  So why does it look like a slow motion replay when run from Flash CS3 on the Macbook Pro.  I had installed all available CS3 updates the day before this.  So I felt confident I had the latest version and any bug fixes would be applied.  Naturally I started searching the forums and yes there were many posts on performance issues for Flash CS3 on the Macbook Pro.  Mostly I found complaints but I did come across one totally insane idea that the crazed writer claimed worked.  To remove all performamce issues they open and close the Flash help panel and problem solved.  I was desperate and so I took the road less travelled and ,yes, my problem was solved.  Opening and closing the help panel in Flash CS3 removes all performance issues on the Macbook Pro.  Why and how the hell they came across this solution I have no idea.  It's like blue vein cheese.  How did anyone ever realise blue vein cheese should be eaten and not thrown away.  Oh, look the cheese is off!  No, no, no it's fine here try a piece.  My Flash app runs like a dog here let me just try opening the help panel.  How ever they did it I thank them.
Blogged with the Flock Browser

Thursday, May 08, 2008

Congratulations Flock

I've been using the Flock browser for a while now and I love it.  There have been a few occasions when I've found myself back in Firefox and missing those Flock extras.  In fact I'd become so used to Flock that I'd forgotten other browsers don't have a "People" sidebar; how do you people manage.  Anyway enough of that.  You don't need to take my word for Flock's greatness because Flock won a Webby in the Social Networking category.  They were competing against such web 2.0 luminaries as Facebook, Ning and Bebo  (Facebook took out the Peoples Choice award).  So congratulations to Flock.  Your hard work has paid off.

Dreamweaver Drupal API extension

For the last few months we've been using the Eclipse PDT plugin for PHP development.  During this time most the PHP work we've been doing is around the Drupal CMS.  Due to the number and range of Modules a typical Drupal site uses PDT has proved a real time saver.  I know PDT isn't for everyone...  Well if you are a Drupal developer and you use Dreamweaver you may be interested in the Drupal API extension that is being developed by  The extension provides Drupal API code hints (and snippets?).  It is currently in beta but they plan to have a full release later in the year.  They also have a jQuery API extension that looks very useful.

Wednesday, May 07, 2008

OzFlex May Meeting

The Melbourne based OzFlex User Group will be holding their next meeting on Monday 12th May at the Loop Bar. The night will feature a Adobe AIR presentation and they will be giving away a full copy of Flex Builder 3 Professional. Doors open at 6.30 for a 7 PM start. You can find out more and register at OzFlex.

Friday, May 02, 2008

Amazon Founder Invests In Kongregate

Yesterday TechCrunch reported that Amazon founder Jeff Bezo has invested $3 million into the casual gaming site Kongregate. From the article it seems that Kongregate didn't particularly need the money but didn't mind taking it either.

This news gives me great hope for the future of casual gaming. At the moment there are a lot of gaming portals. Many with their own API's and revenue sharing systems. This is bad news for developers. The more your game is played the more revenue you create. At the moment this means publishing your game in as many systems as possible and this may mean developing an understanding of a number of these API's. Companies like MochiAds simplify this to a degree. But you still want to optimise for sites like Kongregate (which don't display MochiAds). What casual gaming needs right now is the emergence of a small number of dominant gaming sites. This will simplify the number of API's developers need to learn, establish a common revenue sharing model and provide casual gamers a shared destination. The success of Kongregate, evident in Bezo's investment, is a clear step in this direction and consequently a good thing for developers and players.

Thursday, May 01, 2008

The Open Screen Project

Adobe (along with a long list of industry partners) have just announced the Open Screen Project. The aim of the project is to have a single consistent medium for content delivery across the full gamut of devices (computers, mobiles, TV ...). To facilitate this Adobe have announce four major initiatives:

  • Removing restrictions on use of the SWF and FLV/F4V specifications
  • Publishing the device porting layer APIs for Adobe Flash Player
  • Publishing the Adobe Flash® Cast™ protocol and the AMF protocol for robust data services
  • Removing licensing fees – making next major releases of Adobe Flash Player and Adobe AIR for devices free

The list of industry partners is fairly impressive and includes : ARM, Chunghwa Telecom, Cisco, Intel, LG Electronics Inc., Marvell, Motorola, Nokia, NTT DoCoMo, Qualcomm, Samsung Electronics Co., Sony Ericsson, Toshiba and Verizon Wireless, and leading content providers, including BBC, MTV Networks, and NBC Universal.

You can find out more at the Open Screen Project Web site. This strikes me as a very exciting initiative and I look forward to seeing what news and commentary emerges in the next week.

First AIR Application : hiding the FlexChrome

Yesterday I started work on my first real AIR widget.  I've had a play around with it in the past and enjoyed what I've seen.   But it's not until you have a real project that you start  to really appreciate a new technology.  The widget  I'm building is going to need multiple windows so I spent a fair bit of time getting used to the AIR Window mechanism.  What I learned is that your life is going to be a lot easier if you can use mx:Window to create new AIR windows rather than the NativeWindow.  What I also learned is that getting rid of the Chrome in mx:Window is not as obvious as it first seemed.  The Chrome refers to the framing of the window  (i.e making it look like all the other windows the OS  creates).  It's easy enough to set the SystemChrome to none.  But that just means the window will use the FlexChrome (i.e has the features of the NativeWindow but with styles defined by Adobe).  The FlexChrome is nice but it's not suitable for our design so it has to go.  The problem is that it's not that obvious how you make the FlexChrome go away.  I finally found the answer among the mx:Window styles.  You need to set showFlexChrome to false.  The best way to do this is through CSS.  All of our windows will need custom chrome so I created a style for Window (see below) and the job was done.  It's one of those things that seems obvious now I know but that took me way to long to find.

The Kongregate Sidebar

I'm a big fan of Kongregate.  I don't play everyday.  But if I'm in the mood for "casual gaming" then Kongregate is my home.  So I was very excited last night to discover the Kongregate Firefox Sidebar.  Kongregate has this great system of badges.  When you achieve a certain level of play in a game that has a badge you get the badge.  Badges give you points.  Points increase your level.  More than that badges point to games that someone thinks is worthwhile.  Often it's the games that have won the weekly prize that get badges.  For developers badges mean more game views and that means more revenue.  So everyone on Kongregate is interested in badges.  Therefore it's a wonderful thing that the Kongregate sidebar shows you all the badges, shows which ones you are missing and links to the games.  It also shows you the current challenge, your points and if you have any friends online.  Just another reason why Kong is King!

Blogged with the Flock Browser

Wednesday, April 30, 2008

AIR PixelPerfect Application Updated

PixelPerfect was one of the first AIR applications that I took a shine to.  It is extremely simple and yet extremely useful.  Essentially it is a rectangle with horizontal and vertical rules.  Adjusting the size of the rectangle allows you to take measurements between objects on your screen.  I used it for ensuring our CSS layouts were as close to the design layouts as humanly possible.  But with the release of the full version of AIR I've been missing PixelPerfect for the last few months.  So it was great news to see the release of an updated version of this handy tool.
Blogged with the Flock Browser

Great AIR Resource List

Jason Bartholme has posted a comprehensive list of resources for Adobe AIR development.  The list includes the most exhaustive listing of available AIR applications I've seen anywhere as well as links for the newbie and articles for the more advanced users.  This is an excellent resource for anyone interested in this emerging technology.
Blogged with the Flock Browser

Sunday, April 27, 2008

Mochiads : Adds Revenue Stats

If you've made a Flash game and posted it on any of the many game portals then there is a good chance you've heard of Mochiads. In case you haven't Mochiads allows you to easily add ads to your games and provides some handy tools for managing your game ads. One great thing about Mochiads is that if someone rips off you game and posts it on their site then you will still get revenue for everytime the game is played. Another neat feature is that they will post your game to some game portals therefore saving you lots of work. They mention some of these portals on the site but it turns out there are quite a few others. The reason I discovered this is because of a great new feature. Mochiads now provides details about the countries and domains where your games are being played including the eCPM (effective cost per thousand) for that country or domain. Now I only have one game (at the moment) and it's not a world beater. But I was still interested to discover that Wheel of Death is being played more in Israel than anywhere else (Estonia was ranked third for plays). Despite that I still earned more from America where the eCPM is 78c compared to 23c in Israel. Mochiads is a great service and this new addition makes it even greater. If you are building Flash games and haven't used Mochiads then perhaps you should take a look.

Saturday, April 19, 2008

AdvancedED Flex Application Development : Book Review

Book Cover : AdvancedED Flex Application Development

AdvancedED Flex Application Development offers a well written extended case study on the details of developing the Rich Media Exchange (RMX). The RMX was built using Adobe Flex and numerous OpenSource tools (i.e. Drupal, OpenAds).

Now straight off any book that talks about Drupal and Flex is going to get my attention. At work we are currently looking into the best way to use Flex and Drupal together for a range of projects. From my perspective having Drupal provide accessible access to content for all users while using Flex to provide rich usability for most users is a great solution. It also means less time spent with CRUD and more time spent on the user experience. Consequently I approached this book with great interest.

The first few chapters did nothing to quell my interest. They provided an engaging perspective on web 2.0, the Flash platform, their planning process and the OpenSource technologies used.

Unfortunately my interest abruptly stalled in chapter 5 (Flex styling) and only intermittently recovered throughout the rest of the book. The problem for me is that this book tries to do too much. If you’re ready to start developing applications on the scale of the RMX there is a good chance you’ve already spent quite a few hours on the Flex learning curve. You don’t need chapter after chapter of detailed code examples and their explanations.

Essentially I think the RMX is almost two good books. The first book is for developers who are relatively new to Flex and are interested in a cookbook style book of common problems and techniques for solving them. The RMX case study would make these examples more real and therefore engaging for that audience. Add a few chapters to introduce Flex basics and you would have an excellent intermediate level book. The second book is for developers who are familiar with Flex and would be interested in the processes and thinking behind building a larger Flex application and integrating it with OpenSource tools.

This is a well written book and if the individual chapters were available online as articles you would read and cherish some of those articles. Unfortunately, I feel the concept gets in the way of, and ultimately lets down, the writing. There will be developers who are at the right point in the curve to appreciate the whole book. Less experienced developers might eventually grow into the whole book. Experienced developers should borrow the book from a friend and cherry pick the bits they need.

Blogged with the Flock Browser

Flash 3D goes to the next level : Alternativa3D Bunker Demo

Yesterday Alternativa3D announced version 5.0 of their Flash 3D engine.  As part of this announcement they also published two new demos.  The Bunker provides a Half-Life like multi-room military space.  The demo is very responsive and has a impressive level of detail.  Anyone interested in where 3D might go online should take a look at these demos.
Blogged with the Flock Browser

Friday, April 18, 2008

Flash 2D Physics : Box2DFlashAS3 Version 2 released

I've been messing around with Box2DFlashAS3 since the start of the year.  It's not the easiest of the Flash 2D Physics engines to learn but it is definitely the most versatile.  I haven't found much information on the changes in the new version.  But the updated demo includes ragdolls and the speed and accuracy seems much improved from the previous version.  I look forward to running it through it's paces.

Blogged with the Flock Browser

Australian Adobe AIR Camps

Adobe will be running a series of free AIR Camps in Australia and New Zealand from 15 May (Melbourne) until 26th June (Wellington).  These will be all day events focusing developing and deploying AIR applications using Flex, HTML and Javascript.  You can find out more and register at the Adobe Pacific Events site.
Blogged with the Flock Browser

Tuesday, April 15, 2008

Talking about Cairngorm

There is a lot of informed and intelligent debate around Cairngorm and it's dependance on "Singletons". We have been using Cairngorm for the last six months and while we are aware of it's faults we also feel that it offers many benefits. It's not my intention here to get involved in an argument about it's strengths and weaknesses, I've made a few posts touching on this already. Instead I want to use this post to collect some of the better posts on this topic:

Blogged with the Flock Browser

Friday, April 11, 2008

Blogged With Flock

I just discovered a fun way to discover interesting blogs.  Simply go to Google and search for "Blogged with the Flock Browser".  This is the signature that Flock adds (if you choose to let it) when you blog from Flock.  I've found myself blogging from Flock more and more because it's just so easy.  You know the blogs that Google discovers will be of interest because interesting people use Flock.  Here's 10 Flockers blogs that I enjoyed :
Blogged with the Flock Browser

Fave Widget Update

I moved my bookmarks from to Faves back when they called themselves BlueDot (my Faves). Since then I've posted more than once (11 times if we count this post) about their excellent service and converted a few friends along the way. I've also been using their blog widget for most of that time; it was simple and yet very useful. Yesterday Faves announced a new blog widget. The new widget has a neat "interactive wizard" to allow easy customization of the content and appearance of the widget. For example, you can filter Faves based on one or more tags; select whether to show only your Faves and/or your Friends Faves and/or everyones Faves. The best feature is that you are no longer showing a list of links from your Faves you are actually showing your Fave. Which means you can include the Faves thumbnail image, the Favers profile image, the link and the Faves note. This last bit is my favourite part of the new widget. Often a links title is less than helpful. The note can be a quote from the page or something you've written as a memory aid or an opinion about the page. Whatever it is you control the note for your Faves note. Which greatly increases the Faves usefulness.

The wizard also offers many options for controlling the widgets appearance. There are 8 fully styled Themes, a no style options and a option to fully customise 14 elements of the widget. In the end I was a bit fussy and went with no style so I could fully control the widgets appearance in my blog template. You can see the results in my sidebar near the end of the page. You can find the wizard at :, but you'll need to be logged in to view it. You can also find out more about the advanced styling from the Faves Wiki.
Blogged with the Flock Browser

Tuesday, April 08, 2008

Flex and AJAX Testing with Borland Silk

Borland has released Silk 2008.  The first update to it's automated testing tool in over 2 years.  For this release they have rebuilt the products architecture to make it more flexible and to allow it to support applications it hasn't traditionally supported.  A significant element of this release is the ability to test Flex and AJAX applications and the use of Flex for application development.  Borland's Brad Johnson explains their choice of Flex :

"The reason is you have a vendor to go to who is in control of the spec and will answer the calls. We're not neglecting AJAX, but there are 200 flavors of it."

Quoted from InternetNews
Blogged with the Flock Browser

Friday, April 04, 2008

Flash Media Server Tour

In early May an Adobe Roadshow will be coming to Sydney and Melbourne to showcase the capabilities of the recently released Flash Media Server 3. You can find out more and register here.

Dates & Locations:
  • Sydney : 1st May,2008
  • Melbourne : 7th May, 2008

Shu : AIR wrapper divided opinions

Newly released shu allows you to put a wrapper around your AIR applications. Therefore allowing you to interact with the OS in ways that AIR doesn't allow. The idea of a wrapper for the AIR wrapper has stirred up quite a bit of debate among RIA bloggers. The aim of this post is not to add to the debate as to keep track of it. Below is links to posts discussing the pros and cons of shu :

Thursday, March 27, 2008

Book Review : Pro Drupal Development

Last year at work we spent some time reviewing available Content Management Systems. Our aim was to streamline some of our more basic web development work to allow more time for the interesting bits. After quite a bit of testing we settled on Drupal. We all recognised that Drupal was a complex system and that we had a lot to learn. We also recognised that it had the flexibility to deliver the more challenging aspects of our project specs while keeping editing simple for our clients. We accepted that a steep learning curve came with the package. That learning curve has two distinct areas :
  • Interface driven configuration
  • Scripting based configuration

Using the UI in Drupal to configure your site involves remembering where all the bits are and which ones are relevant to what you are trying to do. This is most obvious when installing a new module. As the Module needs to be enabled (and if there are any dependancies they need to be enabled, configured ... first). You then need to set permissions and then to configure the Module. That's before you start working out how to implement the thing you wanted in the first place. You find yourself coming back to the site a few months on and wondering how the hell did we do that? We have made a lot of progress but we still have a long way to go in becoming comfortable with the Drupal admin UI. Scripting based configuration offers an even steeper slope to climb and in the end we turned to the books; or at least one book : Pro Drupal Development (John K. VanDyk & Matt Westgate, Apress, 2007). It is hard to imagine doing any serious Drupal development without having read this book. It's not that the information isn't available from other sources. The Drupal site is chock full of information if you have the patience to find it and make sense of it. That's the problem with community driven resources they can grow a little wild. Pro Drupal Development offers the information you need for Drupal development in a logical sequence with clear and simple examples. It is written from a place of deep Drupal knowledge and it seemed to me that every page dripped with powerful gems that would transform your Drupal development experience. Perhaps that sounds a bit over the top. But I did pick up a lot of tidbits that I'm using daily. From my perspective the book can be roughly broken into three sections. The first section, Chapters 1 - 10, is what you have to know. It looks at Modules, Blocks, Themes, Nodes and the Form API. You can't build anything in Drupal without a good understanding of these concepts. The second section, Chapters 11 - 23, are things you should know. It looks at filtering, searching, caching, localization, security. You shouldn't build anything in Drupal without an understanding of these concepts. The final section is the Appendices and specifically Appendix A which has the Database Table Reference. Having this handy reference at hand is going to save you a lot of time if you need to write an queries (and considering the patchy selection of Methods most Modules offer you will probably need to write a few queries). I don't buy many programming books and consequently I'm very selective about what books I do buy. I think you need to buy this book because Drupal's support material is a rambling thicket. I guess you may feel a touch put out buying a book for that reason (I did). This book is good compensation for the inconvenience of Drupal's documentation and in the end this book makes it clear that Drupal itself is worth the effort.

Wednesday, March 19, 2008

Actionscript Reference for RIA Development

Adobe have released the Actionscript Reference for RIA Development.  This free pdf provides an alphabetical reference for all native Actionscipt API's for Flash, AIR and Flex.  The reference is very clearly laid out making it very easy to identify the relevant platform for each API as well as available properties, methods, interfaces and superclass.
Blogged with the Flock Browser

Tuesday, March 18, 2008

Blist : easy online database

Just spent some time looking at a new Flex application called blist.  It promotes itself as the world's easiest database and from a quick test it's hard to disagree.  I had a look at Coghead last year and while Coghead is geared a little more towards database applications I found it quite counter intuitive.  In contrast blist makes it very easy to make and query databases and provides some very useful data types.  Perhaps the clearest example of this is the date field which allows them to provide a calendar view of your table.  But equally useful are the very easily created (and customised) pick lists, image fields and url fields (that provide site previews).  It's not clear at this stage how they plan to make money off this fine system as it's free to sign up and use the beta.  TechCrunch reports that "they do intend to charge both casual consumers and business users" but it's unclear when and how this will happen.
Blogged with the Flock Browser

Thursday, March 13, 2008

Eclipse PDT : PHP Editor

PDT is a PHP editing IDE for Eclipse.  It provides all those lovely debugging, outlining, code hinting tools that  Eclipse provides for PHP development.  I hadn't written about it earlier as I hadn't had time to get going with it until yesterday.  My colleague installed it pretty well straight away and has been using (and  raving about ) it since.  I have been looking across with envy and saying I must find time to get that installed. 

To be fair I had tried to install it after the 1.0 release.  But it can be a bit awkward to install as it has a swarm of dependancies.  Fortunately, there is now an all in one release, but it means re-installing Eclipse and for Flex developers then re-installing Flex Builder (this question of dependencies and how they are managed is Eclipses Achilles heal).  It is worth the effort as PDT is already a great PHP development environment.

Blogged with Flock

Wednesday, March 12, 2008

Flash Player : April Security Update

Adobe have released an advanced warning regarding the 9th April release of a Flash Player Security Update.  The update is comprehensive and has the potential to break many existing projects.  I would recommend that anyone who has developed a Flash application that loads data through any mechanism take a close look at the update and consider any necessary action.

Blogged with Flock

Google Sites : Get Your (Google) Stuff Together

For a long time it's been clear to me that Web 2.0 must eventually resolve itself into a small number of all in one place tools.  For the last few years many of us have been choosing publishing platforms for our image, video, blogging, bookmarks, calendars, documents ...  But that place hasn't always been the same place.  For example, this blog is published using Google Blogger and I regularly include photos stored in Yahoos Flickr (I could use Picasa but I prefer Flickr).  I have sidebar widgets that aggregate my bookmarks from Faves and my shared items from Google Reader.  But I have other content in other places that can't be easily added to my blog and the blog isn't the ideal place for all my content.  What we need is one flexible tool that brings them all together.  The recently released Google Sites seems to me to be a prototype for the uber-tool of the future.  Google Sites is built on tools Google acquired from the Jotspot wiki company.  It allows you to bring together content from a wide range of (Google) sources; calendar, docs, spreadsheets. 

At this stage I'm just noting my thoughts on Google Sites. I haven't had time to get under the hood and have a play.  I certainly have some concerns about how nicely it plays with other systems.  I'd hate to think a time is coming when we need to make a choice between one of two or three uber systems for all our bits.  But it seems we are one step closer to being able to display all our public bits in one place and that a good thing.

Blogged with Flock

Friday, March 07, 2008

My First Game : Wheel Of Death

Screenshot : Wheel of Death

Feeling pretty excited I uploaded my first game; Wheel of Death onto Kongregate a couple of hours ago.  If you aren't familiar with Kongregate it's the king (King Kong : apologies for that) of the new wave of web 2.0 social gaming sites.  If you like playing trivial and annoying Flash games (like the one I just added) it's a great place to go.  The game was built using the 2D Physics Engine Box2DFlashAS3.  This was my preferred engine when I did a review of the available engines back in January.  I haven't written much about Flash 2D Physics since them mostly because I've been spending most of my spare time building this game.  I think it's still a bit buggy.  But for a first game I'm pretty happy.  I've got a few pressing work committments.  But hopefully I'll have time to get a few more of the bugs out and blog about the experience of building it with Box2DFlashAS3 in the near future.

Blogged with Flock

Tuesday, March 04, 2008

Wozniak criticises smartphones

"I'm learning to use their menus, it's awkward. I feel like a slave and less important than the technology."
The above quote is from Apple co-founder Steve Wozniak and was made at this weeks Broadband and Beyond conference in Sydney. He also had some mixed comments toward the iPhone. But the above quote really struck a note for me. Considering how long we've been designing and using screen based GUI's I don't understand why even the most basic tasks on the latests phones are so hard to do. I regularly find myself cursing because it takes five selections to delete messages or four to make a phone call. Surely common tasks (like making a call) should be easier. The other thing this comment highlighted for me is that technology works when it puts people first. Technology should always aim towards the highest achievable level of transperancy.

Blogged with Flock

Wednesday, February 27, 2008

Commonwealth Bank adopts Adobe AIR

The Australian has published an article about an Adobe AIR application that is being developed by the Commonwealth Bank.  The AIR app will allow the Commonwealth Bank's brokers to prepare loan applications offline and then transferring them for approval when a connection is available.  There have been a number of major players overseas who have developed AIR applications (i.e ebay, The New York Times, BBC etc).   But this is the first major Australian company  to announce  this sort of development.  I think it is also very significant that it is for such a security sensitive use.  This will go a long way to quell any client concerns about AIR's reliability and security.

Blogged with Flock

Australian AIR Camps

Adobe AIR Camps have been announced for Brisbane, Sydney, Melbourne and Auckland.  At the moment we only have dates.  But there is a form for registering your interest and the promise of email notification when details are available.  Dates are :
  • Thu 27 Mar - Brisbane, Venue To Be Confirmed
  • Tue 20 May - Sydney, Venue To Be Confirmed
  • Thu 22 May - Melbourne, Venue To Be Confirmed
  • Thu 29 May - Auckland, Venue To Be Confirmed

Blogged with Flock

Tuesday, February 26, 2008

Flex 3 : Module Optimisation

In my last post I mentioned that the must have feature for me in Flex 3 is the module optimization. So one of the first things I did this morning after installing Flex Builder 3 was to re-publish an existing project using this feature. This project uses 25 modules to manage the various elements of the system. Prior to optimization the size of the published modules was between 140 Kb and 470 Kb. After optimization the size was between 24 Kb and 180 Kb. You can do the maths on the actual percentages but however you look at it's a very significant difference for very little effort. You can see a video of Tom Lane explaining this new feature here.

Blogged with Flock

Flex 3 Released

This is the obligatory post for everyone who breathes, blogs and uses Flex : Flex 3 has been released. You This is an exciting new release of Adobe's RIA juggernaut. From my perspective it is a must have release just for the module optimization features. But there are no shortage of great features to make our lives easier. You can find a full list of features with some videos here.

Blogged with Flock

Wednesday, February 20, 2008

IE 8 : Version Targeting debated

Over at "A List Apart" Jeffrey Zeldman and Jeremy Keith aren't quite seeing eye to eye on Microsoft's plan for version targeting in Internet Explorer 8. The idea is that IE8 will allow you to define a meta element that tells the browser how to render the page. Therefore, if your page has a bunch of hacks that work in IE7 then the page won't break in IE8. The cusp of the ALA debate is that standards savvy developers will need to add the meta element or have their pages forever rendered ala-IE7 because IE8's default render engine is IE7. Jeremy Keith notes "If Microsoft are to be believed, the self-crippling default behavior of IE8+ is necessary to save the web" and "Version targeting is not a bad idea. The choice of delivery mechanisms—meta element or server header—is inspired. As an optional feature, this could prove to be a real lifesaver in some development environments. As a mandatory millstone however, it strikes a blow against progressive enhancement". This is a subtle but important debate and everyone should take a moment to read these two articles:

Blogged with Flock

Tuesday, February 19, 2008

Quicktime 7.4 removes all support for Flash Player

I can't find any official mention of this except for a forum thread but the latest version of Quicktime 7.4.1(14) has removed all support for Flash Player. This has been coming for a while with an update last year (?) that forced users to manually enable Flash if required. This will create a serious headache for our group which has been using LiveStage to combine Flash and Quicktime for at least the last five years. Consequently everything we've made in this manner will stop working as soon as users update to the latest version of Quicktime. I know not many people used LiveStage but I also know we weren't the only people using it. One up side is we won't need to consider LiveStage as an option for interactive video projects in the future. Flash is now the clear leader when you need to combine video, animation and interactivity (some may suggest we look at Silverlight but I think we'll need to wait until it grows up a bit).

Blogged with Flock

Director 11 : Coming Soon

When Adobe and Macromedia "merged" there was a lot of talk about which apps would hit the waste bin of history.  High on that list were Freehand, Authorware and Director.  Freehand was the first to go.  But at a Q&A session at webDu 2007 one of the panel members (I think it was Mike Downey) surprised most attendees when he confirmed that work on the next version of Director was advancing.  Well this morning on c|net there is an article about a March release of Director 11.  The article doesn't have much detail but it mentions improved 3D, using Ageia PhysX engine, inclusion of the Flash 9 Player and an improved pricing model (with a $99 student edition).  It seems that Director really does live to see another year.

Blogged with Flock

Friday, February 08, 2008

pEngine released as glaze

A few weeks back I wrote about pEngine as part of a series of posts on Actionscript 2D Physics Engines.  At that stage pEngine source code wasn't available and there were only a few demos available.  But today pEngine has been re-named to glaze and the code has been released through Google code along with an impressive demo suite.  It's still very much a beta (0.3) with much functionality stiil to be implemented (no sign of any joints in the demos) but will be very interested to see what it has to offer.

Blogged with Flock

Wednesday, February 06, 2008

My internet connection appears to be online

The following message appeared while tring to view a Quicktime movie from a link in a web page. Who would have thought that being online would keep you from accessing internet content.
Quictime Error message : This computer's internet connection appears to be online

Blogged with Flock

Tuesday, February 05, 2008

Yahoo ASTRA : Flash CS3 Components

Yahoo have released a set of free Flash CS3 Components called ASTRA.  The component set includes a Tree, Menu, TabBar, AutoComplete and Charts.  Flex developers already have access to components like these through the Flex Framework.  But Adobe hasn't released equivalents for pure Flash developments.  There are a number of excellent commercial component sets around but who can argue with free.  To help developers get started with these tools Yahoo have provided a simple sample application : the ASTRA Aquarium which provides an example of using all the components.  The source code is available for download and there is also a comprehensive tutorial.

Blogged with Flock

Friday, January 18, 2008

Actionscript 2D Physics Engine : pEngine

In response to my review of the available Actionscript 2D Physics Engines I received a comment from the YAAB (Yet Another Actionscript Blog) regarding a 2D Physics Engine they are working on called pEngine. This engine is a port of the Chipmunk engine from C. At the moment there are some interesting looking demos and not much else. But if you are interested in Flash physics it may be worthwhile bookmarking the YAAB feed.

Thursday, January 17, 2008

Box2DFlashAS3 : Detecting Jack-in-the-Box Collisions

In my last post we started looking at the basics of using Box2DFlashAS3. We saw that you needed to listen for enterFrame events and use this event to update the position of the Sprites representing your Physics Bodies. This post I want to consider how you'd deal with special cases. For example, when you have a Body that needs to respond to a collision in a unique way. Imagine a ball falling onto a Jack-in-the-Box and triggering the box to spring open. The ball will be thrown up and to one side. This sort of response can't be represented by manipulating the elasticity of the two Bodies. The question is how would you detect and respond to the ball colliding with these bodies.

Our Jack-in-the-Box simulation has one special object: the ball. We want to take action when the ball collides with a special object (i.e the Jack-in-the-Box). The ball is a standard b2Body and it maintains a list of what it is in contact with. You can access this list using ball.GetContactList() to return a b2ContactNode. The first body in the list can be accessed using b2ContactNode's "other" property (I assume you can move through the list of contacts using "next" and "prev" but I haven't needed to test this yet). You can then check if this is a b2Body that needs a response. For example, if we have a b2Body called jack we could check if it is in contact with our ball like this :

var c_ball:b2ContactNode = this.ball.GetContactList();
var o_contact:b2Body = c_ball.other;

if(this.jack == o_contact)
var vec:b2Vec2 = new b2Vec2(200,-400);

In this example, we test if the body in contact with the ball is jack. If true we set a new force that moves the ball up and to the right. In my simulation it is unlikely that the ball will collide with multiple special objects at the same time. So I'm happy to assume that there will only be one body in the contact list. If your ball will be in contact with multiple bodies you will want to check all bodies in the contact list.

Box2DFlashAS3 : Getting Started

The last couple of weeks I've been trialling and reviewing the available Actionscript 2D Physics Engines. The outcome of all this research is that I've settled on Box2DFlashAS3 (referred to as Box2D for the rest of this post) as the most mature of the available engines. Today I'd thought it best to give an overview of the basics that are required to start developing with Box2D. The basic steps are :

  • define the b2AABB and it's boundaries
  • define a gravity vector
  • create the world and pass it the AABB and gravity objects
  • create bodies and add them to your world (not covered here)
  • create an enter frame event listener for updating your world

Thats the overview so let's take a look at the details. The code below is pretty much how it appears in the sample files but it's straight forward enough not to need changing :

//from your Classes constructor
// Create the world AABB
var worldAABB:b2AABB = new b2AABB();
worldAABB.minVertex.Set(-1000.0, -1000.0);
worldAABB.maxVertex.Set(1000.0, 1000.0);

// Define the gravity vector
var gravity:b2Vec2 = new b2Vec2(0.0,800.0);

You'll find yourself using the b2Vec2 Class a lot. Essentially whenever we define a force for the world or for a body or set the position of a body b2Vec2 will be a required parameter. It essentially has "x" and "y" properties which are either used as a force for that axis or a position for a body based on context. In this case we are defining gravity so we want a force along the y axis. The amount of gravity you need is effected by your projects frame rate and the speed you generally want things to happen. FOAM has a zero gravity example to implement a similar simulation in Box2D you would set the vectors y value to 0.

// Allow bodies to sleep
var doSleep:Boolean = true;
// Construct a world object
world = new b2World(worldAABB, gravity,doSleep);
//start listening for enter frame events
this.addEventListener(Event.ENTER_FRAME, Update);

private function Update(event:Event):void
world.Step(timeStep, iterations);
// Render bodies
// Go through body list and update sprite positions/rotations
for (var bb:b2Body = world.m_bodyList; bb; bb = bb.m_next)
if (bb.m_userData is Sprite)
bb.m_userData.x = bb.m_position.x;
bb.m_userData.y = bb.m_position.y;
bb.m_userData.rotation = degrees(bb.m_rotation);

The world's m_bodyList is an array of b2Body objects. Each b2Body's userData represents the Sprite or MovieClip used to represent the b2Body. At each step the world calculates the positions and interactions of each b2Body. It's then up to you to update the userData's position. An update mechanism is provided by most of the other engines but Box2D expects you to manage this updates yourself. What is important to note is that changing a b2Body's position or rotation doesn't change it Sprites position and rotation. Therefore, if you want to manually move a Body then you will also need to manually move the userData's position.

These are the basics of getting started with Box2D. What's missing from this post is how you actually add Bodies to your world. Adding a Body in Box2D takes almost as much code as setting up the world and updating it. So it seemed best to save that for another post.

Wednesday, January 16, 2008

Melbourne Flex 3/AIR Pre-release event

Added 18/01/08 : Demand for this event has out stripped expectations and the number of registered attendees has exceeded the venues capacity. If you registered prior to this addition then you should receive an invitation confirming you've registration and providing venue details.

Last week I posted regarding the possibility of Danny Dura coming to Melbourne for a Flex 3/AIR Pre-release event. Well it's confirmed now. This will be a great opportunity for the uninitiated to discover what Flex has to offer and for Flex developers to see first hand the many new features of Flex 3. Attendees will go in the draw for a copy of CS3 Web Premium and Flex Builder 3 Professional.

If you'd like to find out more about Danny Dura then take a look at

Event date and details removed; these will be provided in an invitation email.

Blogged with Flock

Friday, January 11, 2008

Actionscript 2D Physics Engines : Motor 2

This post is part of a series reviewing the available Actionscript 2D Physics Engines. Each engine was tested through the development of three simple simulations; Hello World, Rope Bridge and Stunt Bike. You can find out more about the testing methodology and access the other reviews from the introduction post.

Motor 2 screenshot

Motor 2 is the newest of the Actionscript 2D Physics Engines. Like Box2DFlashAS3 it is a port of Erin Catto's C++ physics library Box2D. Though it is probably more accurate to call it a series of variations on Box2D's themes as Michael Baczynski has exchanged some of Catto's libraries for his own.

I want to start by saying this isn't a review in the same sense as my posts on the other engines. The current Motor 2 release is just a preview. Major features like joints/constraints still need to be implemented. From my perspective that means I couldn't build 2 out of 3 of the test simulations (both Rope Bridge and Stunt Bike require joints). Consequently I haven't built anything with Motor 2. What I offer here is some observations based on looking at the demos and staring at the available code long enough to know where to start building a simulation. I offer this post from the perspective of someone who has spent quite a few hours with the other available engines and is therefore able to make some comparative observations. But really it is a placholder awaiting a more complete release.

So what can I say about Motor 2?

On the up side the demos suggest that the engine will be reasonable fast and accurate. The demo code suggests that Motor 2 is much cleaner than Box2DFlashAS3 and consequently will be easier to pick up (I suspect it will have a similar learning curve to FOAM). Another plus is that the source code is commented. The commenting isn't as comprehensive as APE or FOAM but it's still a vast improvement over Box2DFlashAS3.

On the down side we have no documentation outside the code. The demos are too simple to give us an idea of the engines potential and there is no roadmap to indicate what a full feature set will include.

In summary, I'd say that Motor 2 shows a lot of promise but that it's too early to make a call. I look forward to a more complete release so I can run a few tests and review these observations.

Thursday, January 10, 2008

Actionscript 2D Physics Engines : Box2DFlashAS3

This post is part of a series reviewing the available Actionscript 2D Physics Engines. Each engine was tested through the development of three simple simulations; Hello World, Rope Bridge and Stunt Bike. You can find out more about the testing methodology and access the other reviews from the introduction post.


Box2DFlashAS3 is the most difficult Actionscript Physics Engine to learn. Like Motor 2 it is a port of Erin Catto's C++ physics library Box2D but unlike Motor 2 little effort has been made to assimilate the engine to Actionscripts methodologies. Consequently Box2D's approach may seem a bit foreign to some Actionscript developers. It's only documentation is that provided by Erin Catto for the C++ version and there are very few helper functions to ease the developers burden. To be honest my first instinct was to stay as far away from Box2DFlashAS3 as was possible. Fortunately Box2DFlashAS3 offers an excellent collection of demos covering a wide range of use cases. It also offers 6 distinct joint types and a lot of flexibility in how you create DisplayObject's for your particles. Once I got over the initial shock I found Box2DFlashAS3 was a workable tool. I had no trouble building the Hello World and Rope Bridge simulations and while I'm no where near happy with the Stunt Bike. I'm fairly confident that most of the problems are my own rather than the engines.

In summary, Box2DFlashAS3 offers a substantial learning curve but there are a lot of payoffs. This is partly because Box2DFlashAS3 is the most mature of the available engines (current release version : 1.4.3). It certainly helps that it is a comprehensive port of an existing engine. I still think I'd prefer to be able to use one of the other engines. But because I'm keen to do 2D Physics in Actionscript today then I think Box2DFlashAS3 is my only real option.

Melbourne Flex/AIR Event

There is a good chance that Danny Dura , an Adobe Platform Evangelist from Adobe U.S.A, will be coming to Melbourne for a Flex/AIR presentation on the evening of Tuesday the 29th of January, 2008. This is an excellent opportunity for developers keen to find out more about Flex and AIR and for existing Flex developers to get some pre-release insights into Flex 3. Currently they are requesting expressions of interest to gauge the level of interest for this event. If you are free and interested head on over to TechEvents and register your intent.

Actionscript 2D Physics Engines : FOAM

This post is part of a series reviewing the available Actionscript 2D Physics Engines. Each engine was tested through the development of three simple simulations; Hello World, Rope Bridge and Stunt Bike. You can find out more about the testing methodology and access the other reviews from the introduction post.

APE Bridge screenshot

FOAM isn't quite as easy to use as APE but it is still easy to use. Once again there is good documentation and some useful demos. Of all the engines I think it is the one most in tune with common Actionscript 3 development techniques and hence will look most familiar if you've spent much time with AS3 development. As the screenshot shows it offers a lot more options for adding different shapes to your simulation. For example, every shape in the screenshot (except for the circle) was created using ShapeUtil.createSymmetricPolygon(sides,size). Foam also doesn't require an enterFrame function to update the simulation. Instead you call foam.simulate() and it looks after stepping through the simulation.

So far so good. FOAM had no trouble making the Hello World simulation. Unfortunately, the news is not good for the Rope Bridge simulation. FOAM offers two types of constraints and these both offer some useful properties but at the end of the day I was unable to configure them in a manner that would create my Rope Bridge. The two joined objects were always too far away from each other. So my bridge always ended up looking more like an alpine rescue mission. Perhaps I'm missing a vital element here. It's hard to know. FOAM is the only engine that doesn't have some kind of bridge in the available demos. That could be because a bridge isn't possible at this stage or that it wasn't deemed of interest for the demo. It is worth noting that FOAM is an 0.1 alpha release. I'm sure there is still a lot of work to be done before it reaches a beta state.

In summary, FOAM looks very promising. It's simple to use and flexible with good documentation but I imagine it is still too immature to be used for anything at this stage.

Wednesday, January 09, 2008

Actionscript 2D Physics Engines : APE

This post is part of a series reviewing the available Actionscript 2D Physics Engines. Each engine was tested through the development of three simple simulations; Hello World, Rope Bridge and Stunt Bike. You can find out more about the testing methodology and access the other reviews from the introduction post.

APE Bridge screenshot

Of the available Actionscript 2D Physics Engines APE is without a doubt the easiest to learn. This is partly due to good documentation, the availability of some clear tutorials and comprehensive demos. Even if these resources didn't exist APE would still be the easiest to learn. The APE Engine aims to do as much of the heavy lifting for you as is possible. The process for creating a working simulation might be :

  • Initialise APE Engine with APEEngine.init()
  • Add gravity with APEngine.addForce()
  • Create a group
  • Create a particle (e.g RectangleParticle)
  • Add particle to group
  • Add group to APEngine with APEngine.addGroup()
  • Add an enterFrame listener (and function)
  • Call APEngine.step() and APEngine.paint() in the enterFrame function

The downside to simplicity is reduced flexibility. I had no problems building either the Hello World or the Rope Bridge simulations. Where I ran into problems was creating the Stunt Bike. The issue is that there is only one type of contraint (the SpringConstraint) and this doesn't have many properties. This limitation is particularly apparent when you look at the Box2DFlashAS3 which has 6 distinct types of constraint (called joints).

Another limitation of APE is that there is no support for complex shapes. The engine creates three types of object ; a RectangleParticle, a CircleParticle, and a WheelParticle (a CircleParticle that turns when in contact with a surface). This is offset in a small way by letting you set a MovieClip as the Particles DisplayObject, but this is possible with all the engines.

In summary, APE is easy to learn and use but a limited feature set will make it unsuitable for more complex projects. Having said that APE is still in it's alpha version and this may not be the complete set of features. There isn't a project roadmap available so it is unclear what a full feature set may contain.