home *** CD-ROM | disk | FTP | other *** search
- class illusoft.Help
- {
- var dmc;
- var game;
- var rec;
- var _visible;
- var ob;
- var helpShown = false;
- function Help(mc, rec, game)
- {
- this.dmc = mc;
- this.game = game;
- this.rec = rec;
- var cref = this;
- this.dmc._parent[this.dmc._name + "_txt"]._visible = false;
- this.dmc.onRelease = function()
- {
- cref.Show(true);
- cref.game.listenForKeys = true;
- };
- this.dmc._parent[this.dmc._name + "_txt"].onRelease = function()
- {
- cref.game.listenForKeys = true;
- this._visible = false;
- };
- this.ob = new Object();
- this.ob.onKeyDown = function()
- {
- if(Key.getCode() == 88)
- {
- if(cref.dmc._parent[cref.dmc._name + "_txt"]._visible == true)
- {
- cref.dmc._parent[cref.dmc._name + "_txt"]._visible = false;
- cref.game.listenForKeys = true;
- }
- }
- };
- Key.addListener(this.ob);
- }
- function Show(showAlways)
- {
- if(!this.helpShown || showAlways)
- {
- this.helpShown = true;
- this.rec.setActiveState(false);
- }
- this.dmc._parent[this.dmc._name + "_txt"]._visible = true;
- this.dmc._parent[this.dmc._name + "_txt"].onKeyDown = function()
- {
- trace("blaat");
- };
- this.game.listenForKeys = false;
- }
- }
-