Whoops, missed one line (toward the bottom):
On 2/4/07, T. Michael Keesey <[EMAIL PROTECTED]> wrote:
import mx.utils.Delegate;
import mx.events.EventDispatcher;
class MyClass extends Object {
public function MyClass() {
super();
_doSomething = Delegate.create(this, doSomething);
}
public function listenTo(dispatcher:EventDispatcher):Void {
dispatcher.addEventListener("eventType", _doSomething);
}
public function stopListeningTo(dispatcher:EventDispatcher):Void {
dispatcher.removeEventListener("eventType", _doSomething);
}
private function doSomething(event:Object):Void {
// Do something!
}
private _doSomething:Function;
}
--
Mike Keesey
_______________________________________________
[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