MisterMister
02-19-2005, 08:38 PM
Well I've searched the forums and I haven't found anything about this, or it's been a really complicated even listener model. I need to set a onRelease for a button in my script but I'd like to do it from my GUI class. For instance
class test {
var button1;
var button2;
public function setbutton1 (button1){
button1 = button1;
}
pubic function button1.onRelease() {
doSomething();
}
}
I know that this code doesn't work, but you get the gist. Is there an easy way to do this. I'm trying to wrap up my GUI in a class. I know that I could just sit it outside my class, but I'd like to keep it organized in a class.
Thanks,
MisterMister
class test {
var button1;
var button2;
public function setbutton1 (button1){
button1 = button1;
}
pubic function button1.onRelease() {
doSomething();
}
}
I know that this code doesn't work, but you get the gist. Is there an easy way to do this. I'm trying to wrap up my GUI in a class. I know that I could just sit it outside my class, but I'd like to keep it organized in a class.
Thanks,
MisterMister