OK, so I’m getting a little tired of this error.
If you too are seeing the hateful “1120: Access of undefined property …” without a line number in Flex, maybe I can help.
I’ve noticed strange happenings when in an ActionScript class, I import MXML components of my own design (I oft for the com namespace). I can’t say why this causes an error, and I cannot easily replicate it, but needless to say, this issue has kept me up. Generally, in my main script file, I have to use a redundant import statement to remove it.
So I have
Whenever I modify the main script file, it removes this redundant second import and then throws up the cryptic 1120 error without a line number to help. Imagine the woes for the next developer to work on the product if I didn’t document this highly unusual behaviour.
Another thing I found was once, in a module, importing MXML components and then intiatialising them in actionscript, was causing all my tool tips to die. Weird, huh? Literally, every time you’d navigate to the SWF, no matter the browser, all the tooltip data was removed, leaving small blank boxes. However, if you refreshed, the issue would intermittently go away.
Eventually I traced it to importing MXML classes into my actionscript, though I couldn’t identify exactly what part of it was causing the issue.
Unfortunately, this isn’t one of those small things you can replicate and post to Adobe, but hopefully we can all help each other out with this one.
If you’ve had this issue yourself, please add a comment about it. (Otherwise I’ll get paranoid it’s just me 😉