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?

Community
  • 1
  • 1
justinbach
  • 1,945
  • 26
  • 44
  • pure speculation not really worth putting in an answer, but have you tried adding a 3d animation in your main fla. My guess is your fla doesnt export the necessary flash classes because you don't use them. (like you can do import flash.display.* and it will only export the classes you use in your swf) – Les Jan 20 '10 at 14:51
  • Les - I tried what you suggested and created a simplest-case on-stage 3D tween in the fla and it threw the same errors as the intro animation. Do you know what classes I need to explicitly import? – justinbach Jan 20 '10 at 15:20

2 Answers2

1

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
  • 1,945
  • 26
  • 44
0

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
  • 50,687
  • 19
  • 144
  • 218
  • 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 Jan 20 '10 at 15:31