Welcome | Code | Projects | Archive | Resumé
Code   

Libraries/Code

When programming interactives it's important to have the right tools.

I'm starting to publish here as open-source various pieces of code, mainly generic ActionScript 3 (AS3) classes that I constantly reuse when developing. I hope you find these useful, they may save you considerable time, or at least serve as an example from which you can build your own library. These libraries have been slowly developed over the years and I make pains to try to ensure they are simple to use, easy to understand, and bug free.

The "Swiss Army Knife" metaphor, usually used to describe useful but bloated code, is used here somewhat tongue in cheek. Each of these classes and packages are dedicated to doing one thing as easily and efficiently as possible.

The whole utilities package com.lowke.utils may be browsed here.

[ more libraries to come, namely, AssetManager, SoundManager, Cache, Animat'em, and Rasterize ]
Thumbnail Example Description Ver. Updated
AssetLoader.as is an AS3 package that allows you to easily bulk load and unload assets from external files, being able to load .xml, .swf, .aif, .mp3, .wav, .bmp, .png, .jpg, .html, .txt, and .bin files. It will also load classes or class definitions out of specific .swf files.

AssetLoader is particularly useful when writing actionscript projects in FlexBuilder.

AssetLoader is available at Google Code http://code.google.com/p/lowke-assetloader/.
2.1 Feb '10
RegularButton.as is an AS3 class that extends the Flash SimpleButton class and caters for extra control that is often needed with buttons, such as selected and disabled states, click sounds, click simulations, and keyboard assignment.
1.7 Apr '09
Alert.as is an AS3 package that lets you quickly and easily overlay an alert message an screen, accompanied by a traditional style "info", "question", "warning", or "error" icon.

1.0 Oct '09
LogAs.as is an AS3 package useful in production environmets where errors need to be logged and dealt with rather than causing a crash. In particular, LogAs allows errors to be classed as either "severe", "warning", "info", or "debug".

2.0 Feb '10
CacheAsBitmap.as is an AS3 class that corrects an issue with the cacheAsBitmap flag of Flash DisplayObject, where setting this flag fails to also set it for all its embedded children.

CacheAsBitmap recursivly sets all flags for all embedded children while keeping the instance names of the DisplayObject's children intact for access by code.
1.6 July '09
Callback.as is an AS3 class that listens for an event from any EventDispatcher object and, just once, triggers a function with arguments when that event is dispatched. This is an easy way to piggyback additional arguments onto an event listener, essentially turning an event into a function callback with arguments.
1.4 Dec '09
DoLater.as is an AS3 class that allows you to queue a function to be called once the Flash Player has updated to the next frame and symbols on the frame have been created.

This can be very handy for getting you out of a tight spot.
1.6 Dec '09
Delay.as is an AS3 class that tells ActionScript to call a function just once after a specified interval.

delay() should be used in preference to the deprecated flash.utils.setTimeout().
2.0.1 Dec '09
Matrix.h is a useful C++ template for dealing with matrices.
1.0 Jan '05



© Copyright 2009, Lowke Media. All Rights Reserved.