You need to create your own event class with additional properties for transferring data with it. In your case, you can use a class like
public class YourEvent extends Event { public static const SOMETHING_HAPPENED: String = "somethingHappend"; public var data: Object; public function YourEvent(type:String, data: Object, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); this.data = data; } override public function clone():Event { return new YourEvent (type, data, bubbles, cancelable); } }
then when you send yo:
dispatchEvent(new YourEvent(YourEvent.SOMETHING_HAPPENED, ob));
James hay
source share