Problems & Solutions

Stangle your bandwidth with Entonnoir (free)

Posted in Adobe Flash, Problems & Solutions on March 3rd, 2009 by Øyvind – 2 Comments

EntonnoirJust found this surrealistically fantastic app that’s really useful for web developers. Entonnoir let’s you select how fast you want your mac’c internet connection to be. And when you’re on 100 Mbit at the office trying to test a preloader, it really comes in handy. It’s free too, so what are you waiting for?

Download Entonnoir

Asset SWF, loading/embedding has fundamental differences

Posted in Adobe Flash, Problems & Solutions on December 4th, 2008 by Øyvind – Be the first to comment

Embed or getDefinition

So after a few headaches I arrived at a thesis (at best): If developing and compiling in Flex Builder, but using a library of assets (in the form of a SWF-file) compiled by the Flash IDE, loading the assets.swf at runtime and embedding are not going to give you equal access the assets and their associated classes. Loading the asset SWF will enable you to use:

loader.contentLoaderInfo.applicationDomain.getDefinition("MySymbolClass")

That will return a class definition of the library symbol and it’s associated custom class and base class.

However:

[Embed(source="assets.swf", symbol="MySymbol")]
var MySymbolClass:Class;

will yield, put simply, the most descriptive, built-in class able to describe the symbol. But that’s at the discretion of the compiler. So if I have a button with an associated custom class, let’s say FancyButton, in assets.swf, that code will be elegantly ingnored by the Flex compiler and I’m only able to datatype the button as Sprite or MovieClip (if it has more than one frame). So I’m guessing the philosophy behind the embed compiler directive is that it is meant for embedding primitive assets, like bitmaps, sprites, fonts and so on into the class that adds the fancy, custom code, while loading and using getDefinition is the only way that will allow the assets to have custom code associated with them.

As seen in the photo comic above from the 70′, this discussion might have been going on for a while without me knowing it. I think I will be loading my asset SWF at runtime from now on unless someone has a good reason for me not to.

Flash On The Beach – Thank You!

Posted in Photography, Problems & Solutions on October 20th, 2008 by Øyvind – Be the first to comment

The Old Ship Hotel bar filled to the limit with beer-loving flash developers

The Old Ship Hotel bar filled to the limit with beer-loving flash developers

Just wanted to say thank you to everyone who ran and attended Flash On The Beach ‘08 in Brighton. I had a great time! Here’s a photo I wanted to share. It’s from the Old Ship Hotel bar tuesday night after The Honey Club ran out of beer in just one hour. It was taken with my camera phone, so please excuse the quality.

After the conference I got to kill a few hours in London, so I went to Hamleys to buy the mandatory travel gift for my son. And man do they have some fascinating stuff there. This is a 23 carat gold plated model of a Mercedes SLK which was explicitly stated “Not for sale”. Check it out: