My work is on the V&A website

I appear on 2 pages and I even the site wide search:

Internal Decode:

Inside Love Decode:


I feel this is quite a big statement to make as the Victoria and Albert Museum is a large and well-respected museum.

It is true but probably not as big of a deal as it soundsā€¦ In 2009 the V&A Decode exhibition invited people to contribute by recoding the digital identity created by Karsten Schmidt and submit videos and images.

This exhibition and the work by Karsten Schmidt grabbed my imagination so I created a couple of videos and they appeared on the decode site.

The videos I submitted have some cheesy transitions šŸ™‚ and aren’t that great quality. You can watch them both here:

Internal Decode:

Inside Love Decode:

I did mean to blog about them at the time but never got round to it. The reason I have now is because a Google alert informed me that my name is mentioned on the main V&A website.

So this post is a record of my work being on a major museum’s website!

Flower Picture

Always trying to stretch my comfort zone

I think everyone should regularly do something outside their comfort zone to gain new skills, push themselves and to feel more comfortable in different situations.
Next week I will be throwing myself out of a plane strapped to a random person, putting my life in their hands, in an effort to take my comfort zone to a massive new height!

One idea I also live by is that anything is possible if you have enough time, you just need to put your mind and energy into it.

A new zone

Recently I needed to find an extra special gift for a very special friends birthday. I decided to create a picture for her wall, I knew this would take me out of my comfort zone, as making a big piece of wall art is something I’ve never done before.

After seeing the great work of my friend Cosmo over atĀ Cosmo Cards I chose to do something in the style of his laser cut pictures.
Even though I was able to ask Cosmo for help and a few pointers there were a lot of new techniques to master:

  • Paper – I had cut paper to make paper chains and snowflakes whenĀ IĀ was a child but nothing near this level of paper cutting.
  • Adobe Illustrator – My Illustrator skills were very basic.
  • Print design – being a digital designerĀ I’veĀ not had much experience with large print work.

Here is the final present

The laser cut paper is sandwiched between two sheets of glassĀ in-frontĀ of the white background, to add depth and shadows that change depending on the lighting.

Initial idea

When I started this project my idea was to create a piece that incorporated 2/3 different scenes, seamlessly blending between them.
Here are a couple of early designs..

It became obvious that this idea was going to take quite a bit of time to get right and that didn’t fit the available time-frame, so I made the executive decision to change to just one scene.
I think the one scene approach allowed me to create a more coherent and better looking piece.

I’m not going to hide the fact the one piece of work was a major inspiration, I have a copy of this on my wall and I really like the complexity of it. There are so many hidden elements that you can look at it time and time again and still find new things. However this adheres to different boundaries as it doesnā€™t need to be cut from paper in one complete piece so it has layers in the image.

Always test

After I created a composition I was happy with I sent it to be cut but what came back wast quite what I was expecting:

A major part of any work is testing!
I know this from the digital world as there are a lot of unknowns and differences between browsers, equipment or the day of the week. This stillĀ appliesĀ to print work.

The first cut was not a complete disaster, testing never is, it highlighted the need for the lines to be thicker as the laser cutter was either not able to cut that fine or they were sucked out by the vacuum that collects the off cuts.

So I went back and thickened all of the lines and tweaked little bits, I could have spent forever slightly tweaking little bits here and there, andĀ IĀ did spend quite a lot of time doing just that!

During all of the little tweaks,Ā improvementsĀ and thickening of lines one aspect was lost, a little Lama hiding in a corner, no one else will ever know thatĀ something isĀ missing andĀ IĀ only noticed whenĀ IĀ got the final framed picture but it reallyĀ buggedĀ me for a while.

Final verdict

ThankfullyĀ the present was very wellĀ received and I’m very happy with the finished piece. The fact that I was able to accomplish this with very little priorĀ knowledgeĀ of theĀ medium was a big bonus andĀ strengthens myĀ beliefĀ that anything is possible.

My illustrator skills vastly improved by the end of this process which i’m sure will help me inĀ futureĀ projects.

All of the designs:

Room 13 Aragon

Just had a new site go live today, itā€™s the normal 100% flash site with an image gallery and blog, but it does have something extra that no other site Iā€™ve created hasā€¦.

The client was a charity that the Tequila\London (my current employer) contributes to and so this work was unpaid and made everyone involved feel fuzzy and warm for doing something good.
The fact that it was an unpaid project meant there was a lot of freedom to change things and do something a little different.

As this is a kids charity I thought a game would be a nice addition for them, however I didnā€™t want it to get taken out by the boring adults so I created my first Easter Egg!!

Life is better when its fun and hopefully this is the start of many more fun Easter eggs in my projects.

The game is a simple falling ball with some physics and it looks like this:

Here is a video of the site and the game. I have edited out how I accessed the game:

You can try and find the Easter egg here:

Other people involved:
ASP Development: Adam Solkar and Andrew Myhre:
Design by Andrea Bernauer:

Storing an ActionScript Object class in SQLite with AIR

In my last post I shared the types of data allowed in SQLite using AIR and I was quite intrigued by the possibilities of storing an Object in a database.

Why would I use this?
Letā€™s say you need to store some setting data for your AIR application, you could do it in XML but why not use SQLite as you can secure it and itā€™s not really that hard to get a database going in AIR.
Storing data as custom data object classes would make it really easy to pass the data around and I like having data typed.

So I made a little test applicationā€¦

application interface

What it does:
It adds custom data objects: ā€œDataVOā€ to the database, which has a string ā€œnameā€ and an int ā€œnumberā€

The name string comes from the text input and the number is generated at random

There are 2 buttons:
ā€œShow all dataā€ ā€“ displays all the data in the database on the left in a text field and puts the last item in the text at the bottom of the screen under ā€œlast data:ā€
ā€œAdd dataā€ ā€“ adds the data in the fields above

The DataVO is very simple and looks like this:

package {
        public class DataVO extends Object{
                public var name:String = "";
                public var number:int;
                public function DataVO() {

The other class in this application is the controller which does all the leg work.

package {
	import flash.display.MovieClip;
	import flash.errors.SQLError;
	import flash.filesystem.File;
	import flash.text.TextField;

	 * @author Sam Hassan - Bashing out the code!!!
	public class Controller extends MovieClip {
		private var theDB : SQLConnection;
		private var dbStatement : SQLStatement;
		private var addDataStatment : SQLStatement;
		private var allTheData:Array = [];
		private var getDataStatment : SQLStatement;

              // the movieClips on the stage
		public var btn1:MovieClip;
		public var btn2:MovieClip;
              // the textFields on the stage
		public var nameTxt:TextField;
		public var numberTxt:TextField;
		public var nameOutTxt:TextField;
		public var numberOutTxt:TextField;
                public var output:TextField;

		public function Controller() {
			trace("\nCLASS Controller");
			 registerClassAlias("DataVO", DataVO); /// this is the key for casting the object to work
//			make the database

		private function makeDataBase() : void {
			var dbFile:File = File.applicationStorageDirectory.resolvePath("dataStore.db");
			trace("\n FUNCTION makeDataBase  - dbFile: "+dbFile.nativePath);
            dbStatement = new SQLStatement();
			theDB = new SQLConnection();
            dbStatement.sqlConnection = theDB;
            theDB.addEventListener(SQLEvent.OPEN, onDatabaseOpen);
            theDB.addEventListener(SQLErrorEvent.ERROR, errorHandler);

		 private function onDatabaseOpen(event:SQLEvent):void {
            dbStatement.addEventListener(SQLEvent.RESULT, tabelCreated);
            dbStatement.addEventListener(SQLErrorEvent.ERROR, createError);

		private function tabelCreated(event : SQLEvent) : void {
			trace("\n FUNCTION Controller.tabelCreated");
			// create the add data statment
			addDataStatment = new SQLStatement();
          	addDataStatment.addEventListener(SQLErrorEvent.ERROR, createError);
          	addDataStatment.sqlConnection = theDB;
          	addDataStatment.text = "INSERT INTO info ( data) VALUES (@data)";

			// create the statment to get all the data
			 getDataStatment = new SQLStatement();
          	getDataStatment.sqlConnection = theDB;
          	// build the sql
          	getDataStatment.text = "SELECT * FROM info";
            getDataStatment.addEventListener(SQLEvent.RESULT, handleAllDataResult);
            getDataStatment.addEventListener(SQLErrorEvent.ERROR, createError);

			// add the button listener
			btn1.addEventListener(MouseEvent.CLICK, doSomething);
			btn2.addEventListener(MouseEvent.CLICK, getAllTheData);

		private function doSomething(event : MouseEvent) : void {
			// add some new data
			var newData:DataVO = new DataVO(); += nameTxt.text;
			newData.number = randRange(0,200);
			numberTxt.text = String(newData.number);

		private function addTheData(newData : DataVO) : void {
//			 registerClassAlias("DataVO", DataVO); // could have this here before the object gets added - but i have it @ the top
			addDataStatment.parameters["@data"] =newData;
			trace("addDataStatment.text = " +addDataStatment.text);

		public static function randRange(minNum:Number, maxNum:Number):Number {
				      return (Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum);

		public function getAllTheData(event : MouseEvent):void{
			trace("\n FUNCTION Controller.getAllTheData");
		private function handleAllDataResult(event : SQLEvent) : void {
//			 registerClassAlias("DataVO", DataVO); // could have this here before the object comes back from the database - but i have it @ the top
			trace("\n FUNCTION Controller.handleAllDataResult");
			var result:SQLResult = SQLStatement(;
			allTheData =;
				trace("\n Controller.handleAllDataResult var: allTheData = "+allTheData);
				var dataString:String = "";
				var newData:DataVO;
				for (var i : int = 0; i < allTheData.length; i++) {
					newData = allTheData[i].data;
					dataString +='\n'+;
					dataString += newData.number;

				trace(allTheData[0].data is DataVO); // returns true
				output.text = dataString;
				// show the last results
				nameOutTxt.text = DataVO(allTheData[(allTheData.length-1)].data ).name;
				numberOutTxt.text = String(DataVO(allTheData[(allTheData.length-1)].data).number);
				output.text = "no data --- click the add button ";

		private function errorHandler(error:SQLError):void{
                trace("Error Occurred with id: " + error.errorID  + " operation " + error.operation + " message " + error.message);
        private function createError(event:SQLErrorEvent):void{
               trace("Error Occurred with id: " + event.error.errorID  + " message " + event.error.message);

I had one issue when I made this test; it was with casting the object returned from the SQL query.
When the object came back I could get the values out by using the dot syntax (result[0].name)Ā  but I like to work with typed objects inside eclipse so I can get code completion

When I tried to cast the object from the SQLResult as a DataVO object I would get:

DataVO(result[0]) // this would cause a ā€œTypeError: Error #1034: Type Coercion failed: cannot convert Object@4a02881 to DataVO.ā€

(result[0] as DataVO) // this returns null

After some searching and going back to the documentation I found this:

ā€œBefore storing a custom class instance, you must register an alias for the class using the method (or in Flex by adding [RemoteObject] metadata to the class declaration). Also, before retrieving that data you must register the same alias for the class. Any data that can’t be deserialized properly, either because the class inherently can’t be deserialized or because of a missing or mismatched class alias, is returned as an anonymous object (an Object class instance) with properties and values corresponding to the original instance as stored.ā€

So basically you need to register the class alias before you add the object to the database or remove it.
To do this I added this line:

 //registerClassAlias("", ExampleClass);
registerClassAlias("DataVO", DataVO);

As Iā€™m only using on class to do the leg work I only need this line at the top of the application but I could have it in the ā€˜addTheDataā€™ function and the ā€˜handleAllDataResultā€™.
It might even work it you just have this line in one place at the start of your application but would have to test that.
While researching this problem I came across a couple of blog posts about having problems with storing ActionScript Objects in SQLite and doing so would crash AIR in OSX, Iā€™ve tested my example on Snow leopard I think and it worked fine, but if anyone tests it and there are issues please let me know.

Here are all the files you need including the .air file in the deploy folder and all code: Air test SQLite.rar

Hope this helps someone.

SQLite data types

After searching the web for a clear list of the data types allowed in SQLite with Adobe AIR I found this link:Ā (from the flex 3 docs ā€“ I hope it gets updated for AIR 2.0)
It has information on the types allowed.

Here are the main points:

The following column affinity types are not supported by default in SQLite, but are supported in Adobe AIR:

  • STRING: corresponding to the String class (equivalent to the TEXT column affinity).
  • NUMBER: corresponding to the Number class (equivalent to the REAL column affinity).
  • BOOLEAN: corresponding to the Boolean class.
  • DATE: corresponding to the Date class.
  • XML: corresponding to the ActionScript (E4X) XML class.
  • XMLLIST: corresponding to the ActionScript (E4X) XMLList class.
  • OBJECT: corresponding to the Object class or any subclass that can be serialized and deserialized using AMF3. (This includes most classes including custom classes, but excludes some classes including display objects and objects that include display objects as properties.)

The following literal values are not supported by default in SQLite, but are supported in Adobe AIR:

  • true: used to represent the literal boolean value true, for working with BOOLEAN columns.
  • false: used to represent the literal boolean value false, for working with BOOLEAN columns.

Each column in the database is assigned one of the following type affinities:

  • TEXT (or STRING)
  • REAL (or NUMBER)
  • DATE
  • XML
  • NONE

For a full description of the above see the docs:

I’m quite excited that you can store an ActionScript Object in a table; I’ll have to do some experiments to see how good this is.

Lightning fast summary of SQLite in Adobe AIR

Peter Elst has posted a video of his 15 minute lightning talk on using SQLite in Adobe AIR

All information should be done like this, fast and to the point, with no extended information to make you switch off.
Then you can go into depth about a certain part in your own time.

Iā€™m currently working on my second project that takes advantage of SQLite in AIR and this video has highlighted a few aspects I need to look into.

Nice work Peter.