Unable to solve flash error 5000: The class ... must subclass 'flash.display.MovieClip'

kfir picture kfir · Nov 24, 2010 · Viewed 8k times · Source

I'm getting the following error on my flash project 5000: The class ... must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. I looked at the class and made sure that I import flash.display.MovieClip and I do. I tried to change the base class in the linkage to flash.display.MovieClip but I got the following message: "The base class specified is a native class and will be defined in the player at runtime. It cannot be edited."

How can I fix this issue? Thanks in advance, Kfir

Answer

gthmb picture gthmb · Nov 24, 2010

importing the MovieClip class gets you halfway there, you have to actually extend the class with MovieClip as well.

ie)

package
{
    import flash.display.MovieClip

    public class MyClass extends MovieClip
    {

    .....