diff --git a/src/as/com/threerings/ezgame/EZGameControl.as b/src/as/com/threerings/ezgame/EZGameControl.as index fd9ffa46..d9b6d23b 100644 --- a/src/as/com/threerings/ezgame/EZGameControl.as +++ b/src/as/com/threerings/ezgame/EZGameControl.as @@ -26,16 +26,23 @@ public class EZGameControl extends EventDispatcher event.userProps = new Object(); populateProperties(event.userProps); disp.root.loaderInfo.sharedEvents.dispatchEvent(event); - if (event.ezProps != null) { + if ("ezProps" in event) { setEZProps(event.ezProps); - } else { - trace("The game is not being run in the ezgame environment"); } // set up our focusing click handler 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 override public function addEventListener ( type :String, listener :Function, useCapture :Boolean = false,