Skip to content

Instantly share code, notes, and snippets.

var Example = new function() {
var anotherWord = "banana";
return function ExampleConstructor( word ) {
this.word = word;
//
this.toString = toString;
this.getStatic = getStatic;
}
@Nutrox
Nutrox / Singleton.as
Created May 2, 2011 22:06
Easy Singleton Example
package
{
public class Singleton
{
static public const instance:Singleton = new Singleton();
public function Singleton()
{
if( instance )
{
@Nutrox
Nutrox / GameKeyboard.as
Created May 3, 2011 01:39
GameKeyboard Class
package com.retromodular
{
import com.retromodular.listeners.IKeyboardListener;
import flash.events.KeyboardEvent;
import flash.utils.Dictionary;
/**
*/
public final class GameKeyboard extends GameSystem