--- In [email protected], Jurgen Beck <[EMAIL PROTECTED]> wrote:
>
> I know that I can write my own custom event class, but I was wondering 
> about something that seems to be undocumented and that seems to 
> initially be promising:
> 
> When adding a meta tag to an AS class such as:
> 
> [Event(name="myEvent",type="flash.events.Event")]
> 
> the event shows up when using the class by creating an event listener. 
> The interesting thing is that code assist picks it up, but it shows up 
> with an altered signature:
> 
> myClass.addEventListener(Event.MY_EVENT,myEventHandler);
> 
> I wasn't able to find any documentation on it. So I am wondering if
this 
> would actually work. At the moment I'm not able to fully test it, as
the 
> compiler throws an error with my static class (defined as a singleton) 
> stating: Error 1119: Access of possibly undefined property MY_EVENT 
> through a reference with static type Class.
> 
> If this is legal code, then the question would be how to 'define the 
> property' so that the compiler is satisfied.
> 
> Does anyone have more information on this?
> 
> Thanks,
> 
> Jurgen
>
Make your own event class to start, I posted an example on livedocs
here
http://livedocs.adobe.com/flex/201/langref/flash/events/Event.html The
capitalization and underscore are an assumption and not actually
defined until you create a class.

Reply via email to