Skip to content

Instantly share code, notes, and snippets.

@chernomyrdin
Created January 20, 2012 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chernomyrdin/1646661 to your computer and use it in GitHub Desktop.
Save chernomyrdin/1646661 to your computer and use it in GitHub Desktop.
Simple Haxe file
package ;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.external.ExternalInterface;
import flash.Lib;
class Dummy extends MovieClip {
private static var _ready:Bool = false;
static function main () {
flash.Lib.current.addChild( new Dummy() );
}
public function new () {
super();
if (ExternalInterface.available) {
ExternalInterface.addCallback( "ready",
function () : Bool { return _ready; }
);
}
addEventListener( Event.ADDED_TO_STAGE,
function (e:Event) : Void { _ready = true; }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment