Advertising
- Something
- Sunday, September 9th, 2007 at 2:46:19pm MDT
- public function new () {
- Reflect.setField(flash.Lib.current, "start", start);
- Reflect.setField(flash.Lib.current, "reset", reset);
- Reflect.setField(flash.Lib.current, "quit", quit);
- }
- // now these methods get called from the master film:
- public function start () { /* application start code */ }
- public function reset () { /* application reset code */ }
- public function quit () {
- // a small hack to call the GameManager.gameDone method:
- var func = Reflect.field(Type.resolveClass("com.casualgameplay.cgdc.GameManager"), "getInstance");
- var gm = Reflect.callMethod(Type.resolveClass("com.casualgameplay.cgdc.GameManager"), func, []);
- Reflect.callMethod(gm, Reflect.field(gm, "gameDone"), []);
- }
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.