Hi,

I've found a strange behavior I wonder if anyone can explain.

If I have a class that extends another, e.g.,

package com.whatever {
     import flash.display.Sprite;
     public class MySprite extends Sprite{
          public function MySprite():void{}
     }
}

and extend that class, if more than one internal classes are defined:

package {
     import com.whatever.MySprite;
     public class MainClass extends MySprite {
          public function MainClass():void{}
     }
}
class HelperA{
     function HelperA():void{}
}
class HelperB{
     function HelperB():void{}
}

I get the following error:

VerifyError: Error #1014: Class com.whatever::MySprite could not be found.

ReferenceError: Error #1065: Variable MainClass is not defined.

Note that this only happens (as far as I can tell) when the public class of
the package extends another class, and multiple internal classes are
defined.

The internal classes don't even need to be instanced or referenced to
generate the error (the bare-bones code above will error out).

If only a single internal class is defined, it works fine (no error).  Even
if the internal class is instanced.

If anybody could shed some light on this, I'd appreciate it.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to