问题
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: Constructor 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.
回答1:
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.
来源:https://stackoverflow.com/questions/5201804/error-1026-received-in-actionscript-3-even-with-the-constructor-being-an-instanc