开发者

Flash AS3 error when importing 3D-tweened movieclip

开发者 https://www.devze.com 2022-12-17 18:58 出处:网络
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 animatio

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 Fla开发者_开发问答sh 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?


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!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消