I stumbled upon an interested error today while trying to initialize a simple variable in my main mxml file – “Constructor functions must be instance methods”

In this particular case, it turned out that I had given my variable the same exact name as my mxml file, causing the compiler to choke and give me that error. This error shows up not just with coinciding variable names, but component ID’s as well.