I agree with Julien - EventDispatcher is ideal for this purpose. It's
one of the reasons it exists - to allow more than one object to be
notified when an event occurs.

Ian

On 8/11/06, julien castelain <[EMAIL PROTECTED]> wrote:
hi,
maybe using mx.events.EventDispatcher could help
i'm probably wrong, but have you tried ?


class A {
      function onRollOver() {
           doTheRollOver();
           dispatchEvent({type:"onRollOver", target:this});
      }

     function doTheRollOver() {
        // do somtehing here....
     }
}

class B {

  function B() {
     var a:A = new A();
     a.addEventListener("onRollOver", Delegate.create(this, onRollOver));
  }

  function onRollOver(e:Object) : Void {
    // do something else here
  }
}

_______________________________________________
[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

Reply via email to