作者:墨镜小靖 | 来源:互联网 | 2023-05-16 22:35
IamnewtoActionScript3andhaverunintoaproblem:我是ActionScript3的新手,遇到了一个问题:UsingFlexBui
I am new to ActionScript 3 and have run into a problem:
我是ActionScript 3的新手,遇到了一个问题:
Using Flex Builder 3, I have a created a project with a few simple classes. If code in class A instantiates an object of class B (class B is in its own source file) then the code compiles fine, but I get the following run time error:
使用Flex Builder 3,我创建了一个包含几个简单类的项目。如果类A中的代码实例化了类B的对象(类B在它自己的源文件中),那么代码编译得很好,但是我得到以下运行时错误:
ArgumentError: Error #2012: B class cannot be instantiated.
ArgumentError:错误#2012:B类无法实例化。
Can someone explain what I'm doing wrong?
谁能解释我做错了什么?
Update: Please see my own answer below (I could not vote it to the top since I'm not yet registered).
更新:请在下面看到我自己的答案(由于我还没有注册,我无法将其投票到顶部)。
3 个解决方案