Use one of the delegate solutions (i.e. the "built-in"
mx.utils.Delegate, but there are several others):
import mx.utils.Delegate;
class Main {
var myButton:Button; // placed on stage in authoring time
function init() {
myButton.onRelease = Delegate.create(this, doSomething);
}
function doSomething() {
trace("something");
}
}
Attila
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com