Hi there,
I was working on my class file, but the event didn't get called
successfully. Anyting I am missing something?
Thank you
========================
var mc:MyClass = new MyClass();
mc.addEventListener ( "testInitialize" , onINIT );
function onINIT ( e:Event )
{
trace("INIT was called");
}
1. package
2. {
3. import flash.events.Event;
4. import flash.events.EventDispatcher;
5.
6. [Event(name="testInitialize", type="flash.events.Event")]
7. public class MyClass extends EventDispatcher
8. {
9.
10. private const TEST_INITIALIZE :String =
"testInitialize";
11.
12. public function MyClass ()
13. {
14. initialize();
15. }
16.
17. private function initialize():void
18. {
19. ......
20. dispatchEvent ( new Event( TEST_INITIALIZE ) );
21. }
22. }
23. }
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders