Hi all,
I am wonder how one would go about dispatching and receiving an event within a document class.
Currently I have the following code:
public static var TEST_EVENT:String = "TEST_EVENT";
public function MyDocClass(){
addEventListener(TEST_EVENT, testOK);
}
public function testDispatch():void{
dispatchEvent(new Event(TEST_EVENT));
}
public function testOK():void{
trace("test is ok");
}
The problem with this is that i get an ArgumentError: Error #1063.
Any ideas?
Cheers