Quick Tip: AIR Application Without Flex Framework

This may be pretty known thing, but I would like to share it. When creating a new AIR project in flash builder (File / New / Flex Project / … Desktop – AIR), and you do not require flex framework, just rename the “Main application file” to whatever.as (instead of whatever.mxml) in the last step of creation wizard (screenshot attached). Or, if your project already exists with main app.mxml file, just create new file with the same name app.as and remove the old one (app.mxml). Make sure your main application class extends Sprite.

Quick tip: Embedded MovieClip not MovieClip?

When embedding MovieClips (with only one frame) from Flash .swf file into your Flex projects, you can fall into runtime issues:

[Embed(source="assets/preloader.swf", symbol="preloader")]
public static const PRELOADER_CLASS:Class;
MovieClip(new Assets.PRELOADER_CLASS());
TypeError: Error #1034: Type Coercion failed: cannot convert *** to flash.display.MovieClip.

Read the rest of this entry »

Game of life (update)

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is the best-known example of a cellular automaton. The “game” is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input from humans. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.

Read the rest of this entry »