开发者

Error 1026 Received in ActionScript 3 even with the constructor being an instance method

I have got a problem with my actionscript class. This is my code:

package {
    import flash.display.MovieClip;
    public class Main extends MovieClip
    {
        public function Main()
        {
            ...
        }
    }
}

It produces the following 2 errors.

  • /.../Main.as, Line 1 5000: The class 'Main' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
  • 1026: Construct开发者_如何学Goor functions must be instance methods.

I don't know what is causing the errors as the do not when i press Check Syntax. I am using OSX 10.6.6 and Adobe CS 5 Trial Edition if those specs help.


As I indicated through the comments, a 1026 error is commonly a naming conflict with the class. "Main" tends to be a very common name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜