This content has been marked as final. Show 10 replies
if it's a movieclip, it must extend the MovieClip class.
what's there to fix?
Did you read my post at all?
ClassA extends MoveClip
ClassB extends Class A
Setting a library symbol's base class to ClassB results in the compile-time complaint that ClassB must subclass MovieClip -- even though it DOES, since ClassA does, and ClassB extends ClassA.
So what to fix is: that Flash mistakenly thinks ClassB doesn't subclass MovieClip.
did you bother importing class A?
Yes, I "bothered" to import the base class. I also bothered not to misspell "class" as "alijqaoeifrjaof," and a host of other newbie errors.
Honestly, why bother responding if you don't know the answer?
Which classes from flash.display have you imported. Just because a class extends another doesn't mean that it inherits all of its properties. Saying a class extends sprite doesn't give you access to all of it's properties, members and display unless you first import flash.display.* or flash.display.Sprite. If you aren't already importing flash.display.*, try importing flash.display.MovieClip and see what happens...
Just installed CS3 to check this -- the AS3 preview didn't have base class
I managed to set a base class to com.mydomain.MovieClipEx2 (see below). So I
wonder what's different in what you did.
com.mydomain.MovieClipEx2 --> com.mydomain.MovieClipEx -->
flash.display.MovieClip --> ...blah,blah,blah
SymTsb's reply (importing flash.display.* in the subclass as well as the base class) solved the problem. I didn't know that was necessary--in every other language I know, inheritance alone does give full access to base class members, and importing is only necessary if the file itself makes otherwise-unresolvable type references.
Yeah. This is just a limit of the language at this point. I would hope that eventually, inheritance would make it to a level comparable to C# and Java. Maybe a version down the road and the issue will be cleared.