[osflash] main 1 frame later
jesterxl at jessewarden.com
Mon Jun 27 17:42:34 PDT 2005
I'm confused on best practice, please enlighten me.
This works in MTASC 1.04:
this.__proto__ = _global.com.rbx.scribbles.controller.shell.Mofo.prototype;
_global.com.rbx.scribbles.controller.shell.Mofo.apply(this, null);// call
if(this.calledOnLoad == false)
And then in the class:
static public function main():Void
public function init():Void
// sets up variables
public function onLoad():Void
// loads additiona GUI
This doesn't work in MTASC 1.08 because main is called 1 frame after init &
onLoad. Now, ordinarely this'd be ok, but for some reason, my init and
onLoad aren't getting called twice, but I swear they are running more than
once, even though I have an if then in there preventing it. I can see 1 of
the controls duplicated if it make it _alpha = 50; for some reason, another
one is beneath it.
Anyway, I guess I don't understand the frame lapse that was implemented.
1.04 works fine, and the technique above allows it to work in Flash or
MTASC; it seems I'll have to modify the above to work with 1.08, but it will
no longer work in Flash.
So, again, what are the best practices for this stuff and why the 1 frame
lapse before calling main?
Thanks if you can help.
More information about the osflash