1 Reply Latest reply on Sep 24, 2011 7:40 AM by Amy Blankenship

    1120: Access of undefined property when using include




      an actionscript file is include into my  application using the following:


      include "menuFunctions.as";


      I had no problem with this file before, but suddenly now if I try to reference any new controls added to the main application (via there ids) from the included menuFunctions.as file, I get the following message.


      1120: Access of undefined property


      But I am still able to reference older controls without any problems.


      Can anyone shed any light on this?



        • 1. Re: 1120: Access of undefined property when using include
          Amy Blankenship Level 4

          This isn't asp or any other HTML based technology, so it's not really good practice to use includes like this. 


          That being sid, it's kind of difficult to determine what the problem is without seeing some code.


          At a guess, you have some errors in your included file that is causing the new code not to compile (it's falling back on your older code), and the Flex compiler isn't showing you the compiler errors.  I inherited some code a few months ago that used includes like this, and I found that Builder doesn't do a good job of showing compiler errors that stem from includes.  Consider yourself lucky your project compiles at all.