A custom event with the dynamic keyword will work as advertised in Danjp's post, but I'd advise against it on any sort of larger project. You lose the ability to strictly type what your informational payload is - if someone else has to edit your code, they may have no idea that you've got a dynamically generated "myData" property on your event, for instance. It will cause no end of headaches for someone trying to edit your code later.
The "correct" way to do this is to create custom events with strongly typed members that hold your data. So for instance:
package com.yourdomain.events {
import flash.events.Event;
import com.yourdomain.model.vo.MyValueObject;
public class MyEvent extends Event {
public var myVO:MyValueObject;
public function MyEvent(type:String):void {
super(type);
}
}
}
So, yeah - that's kind of it in a nutshell. You'll want to google the exact format, mine is simplified - your super() call should have other parameters, and you'll want to override the clone() method. But the advantage here is that anyone inspecting your code knows EXACTLY what kind of datatype to look for as a payload. In this case, it's an instance of MyValueObject.
Let me know if you have any specific questions about why, but that's the general idea. Whenever you do a large AS3 project you'll want to use custom events like this to not only dispatch various notifications but also to carry clearly defined and strictly-typed data payloads.