Changes stemming from a changed MediaContainer.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@148 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-01-18 00:37:54 +00:00
parent 29bec533d8
commit f347723abe
2 changed files with 25 additions and 4 deletions
@@ -51,7 +51,8 @@ public class EZGamePanel extends VBox
_gameView = new GameContainer(cfg.configData); // TODO?
backend.setSharedEvents(
Loader(_gameView.getMedia()).contentLoaderInfo.sharedEvents);
Loader(_gameView.getMediaContainer().getMedia()).
contentLoaderInfo.sharedEvents);
backend.setContainer(_gameView);
addChild(_gameView);
}
@@ -59,7 +60,7 @@ public class EZGamePanel extends VBox
// from PlaceView
public function didLeavePlace (plobj :PlaceObject) :void
{
_gameView.shutdown(true);
_gameView.getMediaContainer().shutdown(true);
removeChild(_gameView);
backend.shutdown();
@@ -8,6 +8,8 @@ import mx.core.mx_internal;
import mx.core.IFlexDisplayObject;
import mx.core.IInvalidating;
import mx.containers.VBox;
import mx.managers.IFocusManagerComponent;
import mx.skins.ProgrammaticSkin;
@@ -21,17 +23,33 @@ import com.threerings.util.MediaContainer;
// 3) When the mouse leaves the flash player and returns, this
// damn thing doesn't seem to grip onto the focus.
//
public class GameContainer extends MediaContainer
public class GameContainer extends VBox
implements IFocusManagerComponent
{
public function GameContainer (url :String)
{
super(url);
rawChildren.addChild(_game = new MediaContainer(url));
tabEnabled = true; // turned off by Container
// focusRect = true; // we need the focus rect
}
public function getMediaContainer () :MediaContainer
{
return _game;
}
// override public function setFocus () :void
// {
// if (stage) {
// try {
// stage.focus = this;
// } catch (e :Error) {
// trace("Apparently, this might happen: " + e)
// }
// }
// }
override protected function adjustFocusRect (obj :DisplayObject = null) :void
{
super.adjustFocusRect(obj);
@@ -52,5 +70,7 @@ public class GameContainer extends MediaContainer
}
}
}
protected var _game :MediaContainer;
}
}