8 Replies Latest reply on Sep 14, 2009 11:24 PM by Flex harUI

    addEventListener results in 1119: Access of possibly undefined property "myEvent" through a reference with static type Class

    majester8425 Level 1

      I am using a main app mxml and a component

       

      I have declared a Metatag in the component

      [Event(name="myEvent", type="events.myEvent")]

       

      I dispatch this from the component

       

      I have a listener on the main app

       

      componentid.addEventListener(Event.MyEvent, gotoMyFunction, true);

       

      I get a compilation error no matter what I do

       

      1119: Access of possibly undefined property  through a reference with static type Class

       

      Any Ideas. I follwed at least 3 examples and in every case I end up with the same result