Error: Is not a function

Hi everyone,

I get the following output error:
TypeError: Error #1006: init is not a function.
at website_fla::MainTimeline/website_fla::frame1()

when i run the following code:


    public class LanguageManager {
        public function init(lang:String = null):void {
            if (lang == null)
                _currentLanguage = Languages.FRA;
            else
                _currentLanguage = lang;
        }
    }

The init function is called on frame 1 of the main timeline like this:

LanguageManager.init(Languages.ENG);

Strangely, if i define the function as being “public static” i don’t get the error.

Thanks for any advice!