Created
January 20, 2012 10:44
-
-
Save chernomyrdin/1646661 to your computer and use it in GitHub Desktop.
Simple Haxe file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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