Added isConnected().

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@144 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-01-10 19:51:49 +00:00
parent ee8f636d7e
commit a6de2c9bc6
+10 -3
View File
@@ -26,16 +26,23 @@ public class EZGameControl extends EventDispatcher
event.userProps = new Object(); event.userProps = new Object();
populateProperties(event.userProps); populateProperties(event.userProps);
disp.root.loaderInfo.sharedEvents.dispatchEvent(event); disp.root.loaderInfo.sharedEvents.dispatchEvent(event);
if (event.ezProps != null) { if ("ezProps" in event) {
setEZProps(event.ezProps); setEZProps(event.ezProps);
} else {
trace("The game is not being run in the ezgame environment");
} }
// set up our focusing click handler // set up our focusing click handler
disp.root.addEventListener(MouseEvent.CLICK, handleRootClick); disp.root.addEventListener(MouseEvent.CLICK, handleRootClick);
} }
/**
* Are we connected and running inside the EZGame environment, or
* has someone just loaded up this swf by itself?
*/
public function isConnected () :Boolean
{
return (_gameData != null);
}
// documentation inherited // documentation inherited
override public function addEventListener ( override public function addEventListener (
type :String, listener :Function, useCapture :Boolean = false, type :String, listener :Function, useCapture :Boolean = false,