Skip navigation
LastNameLeft3000
Currently Being Moderated

Moving multiple symbols "breaks" motion tweens

Jun 12, 2013 10:45 PM

Tags: #problem #flash #cs5.5 #multiple #motion #tween #symbol #break #character_walking #walk #free_transform #tweening #motion_tweens #multiple_symbols

I'm working on a character rotation in Flash CS 5.5 that leads into a basic walk cycle using all motion tweens. The tutorial I'm following (which only uses classic tweens) says to grab all the upper body symbols with free transform and rotate them forward a little. This works fine with classic tweens, but with motion tweens, the parts pop strangely out of place and the more frames I try to move the upper body symbols on, the worse the symbols start randomly sliding around. You can see a simple before/after example posted below. Moving the profile view upper body symbols displaces the arms on the first frame.

 

Is there any way to move multiple symbols without ruining them? Someone else described at length a problem like this on an old thread, but no one answered: http://forums.adobe.com/thread/1084800

 

I've tried taking all the upper body layers and sticking them in a symbol, but that won't work because the left hand will pass over the left leg instead of under due to layering.

 

EDIT - Whatever change is made to the arms during the walk  changes the key frames at the beginning, but only if selected with other symbols. If I move the upper body parts down instead of rotating them, the first frame arms will be retroactively be moved down.

 

motiontweenproblem.jpg

 

Message was edited by: LastNameLeft3000

 
Replies
  • Currently Being Moderated
    Jun 13, 2013 12:58 AM   in reply to LastNameLeft3000

    If you are interested in getting decent results at some point youwill have to looke into the Bone-Tool or use a extension like DragonBones

     

    The reason why you are having "Displacement"-problems lies in the "Math" behind how AnimatorFactory (the system behind Motion Tweens) handles transformations different from Tweens (Its outright misleading to call them Tweens, and Adobe did a poor naming job).

    Right click one of the Motion tweens and chosy "copy as Actionscript 3.0" from the context menu then paste the code in any available textEditor and you will see sth like:

     

    import fl.motion.AnimatorFactory;

    import fl.motion.MotionBase;

    import fl.motion.Motion;

    import flash.filters.*;

    import flash.geom.Point;

    var __motion_Symbol1_9:MotionBase;

    if(__motion_Symbol1_9 == null) {

        __motion_Symbol1_9 = new Motion();

        __motion_Symbol1_9.duration = 24;

     

        // Call overrideTargetTransform to prevent the scale, skew,

        // or rotation values from being made relative to the target

        // object's original transform.

        // __motion_Symbol1_9.overrideTargetTransform();

     

        // The following calls to addPropertyArray assign data values

        // for each tweened property. There is one value in the Array

        // for every frame in the tween, or fewer if the last value

        // remains the same for the rest of the frames.

        __motion_Symbol1_9.addPropertyArray("x", [0]);

        __motion_Symbol1_9.addPropertyArray("y", [0]);

        __motion_Symbol1_9.addPropertyArray("scaleX", [1.000000]);

        __motion_Symbol1_9.addPropertyArray("scaleY", [1.000000]);

        __motion_Symbol1_9.addPropertyArray("skewX", [0]);

        __motion_Symbol1_9.addPropertyArray("skewY", [0]);

        __motion_Symbol1_9.addPropertyArray("rotationConcat", [0,3.91304,7.82609,11.7391,15.6522,19.5652,23.4783,27.3913,31.3043,35 .2174,39.1304,43.0435,46.9565,50.8696,54.7826,58.6957,62.6087,66.5217, 70.4348,74.3478,78.2609,82.1739,86.087,90]);

        __motion_Symbol1_9.addPropertyArray("blendMode", ["normal"]);

        __motion_Symbol1_9.addPropertyArray("cacheAsBitmap", [false]);

        __motion_Symbol1_9.addPropertyArray("opaqueBackground", [null]);

        __motion_Symbol1_9.addPropertyArray("visible", [true]);

     

        // Create an AnimatorFactory instance, which will manage

        // targets for its corresponding Motion.

        var __animFactory_Symbol1_9:AnimatorFactory = new AnimatorFactory(__motion_Symbol1_9);

        __animFactory_Symbol1_9.transformationPoint = new Point(0.499943, 0.500000);

     

        // Call the addTarget function on the AnimatorFactory

        // instance to target a DisplayObject with this Motion.

        // The second parameter is the number of times the animation

        // will play - the default value of 0 means it will loop.

        // __animFactory_Symbol1_9.addTarget(<instance name goes here>, 0);

    }

     

        // Call the addTarget function on the AnimatorFactory

        // instance to target a DisplayObject with this Motion.

        // The second parameter is the number of times the animation

        // will play - the default value of 0 means it will loop.

        // __animFactory_Symbol1_9.addTarget(<instance name goes here>, 0);

    }

     


    This is only the code for simply rotating a rectangle over the duration of 24 frames.

    You notice 2 two problems right away: while having the registration point in the center, Flash distorts the values:

     

        __animFactory_Symbol1_9.transformationPoint = new Point(0.499943, 0.500000); //should be (0.5, 0.5)

     


    you can imagine that this "error" gets worse when inherited from nested symbol to nested symbol, it "exponentially" grows with each nesting, and it will soon reach a point were it gets visible.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2013 12:31 AM   in reply to LastNameLeft3000

    you have the fall back to classic tween or the upgrade to IK. Your choice.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points