Don't generate a TypeError if we're not in an EZGame environment.
It may be well worth adding an isConnected() method that can be used to test whether the EZGame stuff is connected or whether we should just show demo graphics or something. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@141 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -26,7 +26,11 @@ public class EZGameControl extends EventDispatcher
|
||||
event.userProps = new Object();
|
||||
populateProperties(event.userProps);
|
||||
disp.root.loaderInfo.sharedEvents.dispatchEvent(event);
|
||||
if (event.ezProps != null) {
|
||||
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);
|
||||
@@ -100,9 +104,7 @@ public class EZGameControl extends EventDispatcher
|
||||
|
||||
/**
|
||||
* Register an object to receive whatever events it should receive,
|
||||
* based on which event listeners it implements. Note that it is not
|
||||
* necessary to register any objects which appear on the display list,
|
||||
* as they'll be registered automatically.
|
||||
* based on which event listeners it implements.
|
||||
*/
|
||||
public function registerListener (obj :Object) :void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user