导入 3D 补间影片剪辑时出现 Flash AS3 错误
我一直在开发 AS3 应用程序,它即将完成。与此同时,与我合作的一位设计师一直在单独的 .fla 中构建一个影片剪辑,充当应用程序的介绍动画。该简介使用了 Flash CS4 / Player 10 的 3D 补间动画功能,并且在构建它的 .fla 中运行良好。
问题是,当我将影片剪辑导入到应用程序的主 .fla 中时,当我动态实例化影片剪辑并将其添加到舞台时,我会收到以下运行时错误:
ReferenceError:错误 #1069:在 fl.motion.KeyframeBase 上找不到属性 null,并且没有默认值。
在 fl.motion::KeyframeBase/getValue()
在 fl.motion::MotionBase/getValue()
在 fl.motion::Animator3D/setTime3D()
在 fl.motion::AnimatorBase/设置时间()
在 fl.motion::AnimatorBase$/processCurrentFrame()
在 fl.motion::AnimatorBase$/parentEnterFrameHandler()
我猜测只是基于这样的错误数量,我收到的补间影片剪辑中每个关键帧都有一个错误。我已检查以确保两个 .fla 文件中的 Flash 发布设置相同,尽管舞台大小略有不同,但我认为这不是问题所在。我也用谷歌搜索了这个问题,除了 但是 kirupa 上的这个孤独的线程< /a>.
有什么想法吗?
I've been working on an AS3 application and it's nearing completion. At the same time, one of the designers I work with has been building a movieclip in a separate .fla that acts as an intro animation to the application. The intro uses the 3D motion tweening capabilities of Flash CS4 / Player 10, and runs fine in the .fla in which it was built.
The problem is that when I import the movieclip into the main .fla for the application, when I dynamically instantiate the movieclip and add it to the stage, I get a barrage of the following runtime error:
ReferenceError: Error #1069: Property null not found on fl.motion.KeyframeBase and there is no default value.
at fl.motion::KeyframeBase/getValue()
at fl.motion::MotionBase/getValue()
at fl.motion::Animator3D/setTime3D()
at fl.motion::AnimatorBase/set time()
at fl.motion::AnimatorBase$/processCurrentFrame()
at fl.motion::AnimatorBase$/parentEnterFrameHandler()
I'm guessing just based on the number of errors like this that I receive that there's one per keyframe in the tweening movieclip. I've checked to ensure that the Flash publish settings are identical across the two .fla files, and although the stage sizes differ slightly, I don't think that's the issue here. I've also googled the issue and found nothing but but this lonely thread on kirupa.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,问题是我们的 Actionscript 源路径中有一个本地版本的 fl.motion 包,但它已经过时了。现在一切都进展顺利!
Okay--turns out the problem was that we had a local version of the fl.motion package in the Actionscript source paths that was out of date. Now everything's tweening along happily!
据我所知,一旦将 3D 补间动画应用于剪辑,您就无法再通过动作脚本对其进行修改。
我建议要么复制剪辑,而不使用补间,这样您就可以通过 Actionscript 访问和修改它,至于动画,也许可以选择 Copy Motion as Actionscript 3.0。它会吐出一大堆看起来令人讨厌的代码。另一种方法是使用 TweenLite 等具有更好语法的工具“重做”动画。您可以选择补间动画,为其提供一个实例,然后使用 instance.motion.keyframes 循环关键帧并获取位置和旋转值等。
它并不像应有的那么理想:(
看看 flashthusiast.com 网站,了解有关新补间以及如何使用它们的更多见解。
祝你好运,
乔治
As far as I know you once you apply a 3D Motion Tween to a clip, you can no longer modify it by actionscript.
I'd suggest either copying the clip, without the tween, so you can access and modify it via actionscript, as for the animation, maybe go for Copy Motion as Actionscript 3.0. It will spit out a nasty looking bulk of code. The alternative is to 'redo' the animation using something like TweenLite which has nicer syntax. You would select the motion tween, give it an instance then use instance.motion.keyframes to loop through the keyframes and get the position and rotation values for example.
It's not as ideal as it should be :(
Have a look at the flashthusiast.com website for more insights on the new tweens and how to work with them.
Goodluck,
George