package classes { public class A { public function A() { var b:B = new B(); } } } class B { public function B() { trace("Hello"); } }
Class B is only visible to class A - you cannot have more than one visible class in one file (exactly what the error message states).
And you cannot have more than one package in a file.
一个as文件中只能一个package,而且只能有一个对外可见的as类,文件内不可见的类只能在可见的类内使用
http://stackoverflow.com/questions/5888494/flex-4-two-classes-in-one-file
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。