2 Replies Latest reply on Jul 17, 2012 6:28 AM by arao2k6

    Issues with pasting motion tween to AS3.0

    JustHavingProblems

      I can create a motion tween and then right click and copy the motion as action script 3.0. However when I try to paste this in my AS layer the resulting text is not like the AS should be.

      I have no idea what is going wrong, I am trying to follow a tutorial online and I am doing everything that the insrtuctor is doing.

      Please help!

       

      This is what I get when I past:

       

      import fl.motion.AnimatorFactory;

      import fl.motion.MotionBase;

      import flash.filters.*;

      import flash.geom.Point;

      var __motion_Monster_7:MotionBase;

      if(__motion_Monster_7 == null) {

          import fl.motion.Motion;

          __motion_Monster_7 = new Motion();

          __motion_Monster_7.duration = 30;

       

       

          // Call overrideTargetTransform to prevent the scale, skew,

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

          // object's original transform.

          // __motion_Monster_7.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_Monster_7.addPropertyArray("x", [0]);

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

          __motion_Monster_7.addPropertyArray("scaleX", [1.000000,1.050299,1.100597,1.150896,1.201195,1.251494,1.301792,1.352091,1.402390,1.45268 9,1.502987,1.553286,1.603585,1.653884,1.704182,1.754481,1.804780,1.855079,1.905377,1.95567 6,2.005975,2.056274,2.106572,2.156871,2.207170,2.257469,2.307768,2.358066,2.408365,2.45866 4]);

          __motion_Monster_7.addPropertyArray("scaleY", [1.000000,1.050299,1.100597,1.150896,1.201195,1.251494,1.301792,1.352091,1.402390,1.45268 9,1.502987,1.553286,1.603585,1.653884,1.704182,1.754481,1.804780,1.855079,1.905377,1.95567 6,2.005975,2.056274,2.106572,2.156871,2.207170,2.257469,2.307768,2.358066,2.408365,2.45866 4]);

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

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

          __motion_Monster_7.addPropertyArray("rotationConcat", [0]);

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

       

       

          // Create an AnimatorFactory instance, which will manage

          // targets for its corresponding Motion.

          var __animFactory_Monster_7:AnimatorFactory = new AnimatorFactory(__motion_Monster_7);

          __animFactory_Monster_7.transformationPoint = new Point(-0.000781, 0.000000);

       

       

          // 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_Monster_7.addTarget(<instance name goes here>, 0);

      }