views:

236

answers:

3

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?

A: 

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

George Profenza
George, thanks for the response. I'm not actually modifying the moveiclip via actionscript--all I'm doing is dynamically instantiating it (e.g. it lives in the library and I'm doing a new IntroAnimation()) in the code...
justinbach
A: 

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!

justinbach
cool! glad it's all sorted
George Profenza
A: 

Hi I am experiencing the same problem now, can you please give a more detailed explanation of how you solved this issue? Thanks.

Jack