Hi - i know this is an old post - but could anyone please explain how to get the class posted by 5TonsOfFlax to work???
I tried the following...
DataEvent.as
Actionscript Code:
package classes{
import flash.events.Event;
public class DataEvent extends Event{
public var content:*;
public function DataEvent(type:String, data:*, bubbles:Boolean = false, cancelable:Boolean = false){
super(type, bubbles, cancelable);
content = data;
}
public function clone():Event{
return new DataEvent(type, content, bubbles, cancelable);
}
}
}
on stage
Actionscript Code:
var MyClass:theClass = new theClass();
MyClass.addEventListener("callBack",showMessage);
function showMessage(de:DataEvent):void{
trace("doSomething triggered. data is: "+de.content);
}
In theClass
Actionscript Code:
package {
public class test {
public function test() {
dispatchEvent(new DataEvent('callBack','test message'));
}
}
}
But i cannot get it to work 
Thanks for any help