BasicView 和 CameraType.SPRING 的问题
在 Papervision 2.0 中使用 BasicView 类时,我在编译时遇到错误:
1119:通过 a 访问可能未定义的属性 SPRING 静态类型 Class 的引用。
如果我注释掉该静态属性的访问并手动添加常量值,它将按预期工作:
case "Spring": //CameraType.SPRING:
_camera = new SpringCamera3D();
_camera.target = DisplayObject3D.ZERO;
break;
这是在 CameraType
类中定义它的位置:
/*
* the SPRING constant defines a SpringCamera3D
*/
public static var SPRING :String = "Spring";
关于什么会导致这种情况发生的任何想法? 我的第一个猜测是与另一个 static/const var 发生冲突,因为我遇到了类似的 Actionscript 冲突问题。 也许这个 ASCollada 类(也在 PV 库中):
public static const DAE_SPRING_ELEMENT:String = "spring";
Working with the BasicView class in Papervision 2.0, I'm getting an error when compiling:
1119: Access of possibly undefined property SPRING through a
reference with static type Class.
If I comment out the access of that static property and add the constant value manually, it works as expected:
case "Spring": //CameraType.SPRING:
_camera = new SpringCamera3D();
_camera.target = DisplayObject3D.ZERO;
break;
Here's where it's being defined in the CameraType
class:
/*
* the SPRING constant defines a SpringCamera3D
*/
public static var SPRING :String = "Spring";
Any ideas as to what would cause this to occur? My first guess is a conflict with another static/const var as I've run into problems with Actionscript conflicts like that. Perhaps this ASCollada class (also in the PV lib):
public static const DAE_SPRING_ELEMENT:String = "spring";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
与 pv3d 不直接相关,但是可以帮助...
这听起来更像是旧版本和新版本之间的冲突。 您是否可能引用了两个并发版本/类路径。 我遇到过这种问题,忘记删除包含与导入的类相同(但略有不同)的类的 SWC。
Not directly pv3d related but, could help ...
It sounds more like a conflict between an older version and the newer. Could it happen that you have referenced two concurrent versions/classpath. I've had this kind of problem forgetting to remove a SWC containing the same (but slightly different) classes as the imported ones.