3 Replies Latest reply on Dec 12, 2012 10:10 PM by Ankit_Gupta

    Motion presets Not Working on Mac System


      I've been attempting Motion presets feature at Object (by code).It is perfectly Working on Window but it is not working on Mac.can Any one Tell me How to Fix this?

        • 1. Re: Motion presets Not Working on Mac System
          Mohanaraj Adobe Employee

          Hi Ankit,

          Could you please provide more details like

          1. Flash Version

          2. Mac OS Version

          3. Do you see an error when it is not working?

          4. Is it possible for you to post the problematic code snippet?




          • 2. Re: Motion presets Not Working on Mac System
            Ankit_Gupta Level 1

            Flash version 11.4

            Mac OS version 10.6

            not show any error

            I have send code below It perfectly work in Mac but when I use the same code In my project It does not  do any thing ?


            just go through this link.





            when I put entire code of motion preset in function and call that function.It will not work.


            I have made two example in this file


            1.Incorrect Motion Preset With Function

            2.Incorrect Motion Preset Without  Function






            import fl.motion.AnimatorFactory;

            import fl.motion.MotionBase;

            import fl.motion.Motion;

            import flash.filters.*;

            import flash.geom.Point;

            var __motion_mc:MotionBase;



            if(__motion_mc == null)


                __motion_mc = new Motion();

                __motion_mc.duration = 24;



                // Call overrideTargetTransform to prevent the scale, skew,

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

                // object's original transform.

                // __motion_mc.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_mc.addPropertyArray("x", [0,1.08333,2.16667,3.25,1.32955,-0.590909,1.09975,2.7904,0.766775,-1.25685,0.61952,2.4958 9,0.038925,-2.41804,0,0,0,0,0,0,0,0,0,0]);

                __motion_mc.addPropertyArray("y", [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8.125,16.25,24.375,32.5,32.5,36.8333,41.1667,45.5,52]);

                __motion_mc.addPropertyArray("scaleX", [1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.00000 0,1.000000,1.000000,1.000000,1.000000,1.000000,0.825000,0.650000,0.475000,0.300000,0.50000 0,0.387500,0.275000,0.162500,0.050000]);

                __motion_mc.addPropertyArray("scaleY", [1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.00000 0,1.000000,1.000000,1.000000,1.000000,1.000000,0.875000,0.750000,0.625000,0.500000,0.60000 0,0.462500,0.325000,0.187500,0.050000]);

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

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

                __motion_mc.addPropertyArray("rotationConcat", [0,3.33333,6.66667,10,1.77636e-015,-10,-1.77636e-015,10,-1.77636e-015,-10,1.77636e-015,10 ,-1.77636e-015,-10,0,0,0,0,0,0,0,0,0,0]);

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

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

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

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



                // This call to initFilters supplies the Motion with an Array

                // of the fully-qualified class names of the filters in the

                // target's DisplayObject.filters list, in the same order and

                // indices.

               // __motion_mc.initFilters(["flash.filters.GlowFilter"], [0], -1, -1);



                // The following calls to addFilterPropertyArray assign data

                // values for each tweened filter's properties.

                //__motion_mc.addFilterPropertyArray(0, "blurX", [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10], -1, -1);

               // __motion_mc.addFilterPropertyArray(0, "blurY", [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10], -1, -1);

               // __motion_mc.addFilterPropertyArray(0, "strength", [50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.0 0,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00], -1, -1);

                //__motion_mc.addFilterPropertyArray(0, "knockout", [false], -1, -1);

               // __motion_mc.addFilterPropertyArray(0, "inner", [false], -1, -1);

                //__motion_mc.addFilterPropertyArray(0, "quality", [BitmapFilterQuality.LOW], -1, -1);

               // __motion_mc.addFilterPropertyArray(0, "alpha", [1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.0 0,1.00,1.00,1.00,1.00,1.00,1.00], -1, -1);

               // __motion_mc.addFilterPropertyArray(0, "color", [0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff000 0,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff0000,0xff000 0,0xff0000,0xff0000,0xff0000,0xff0000], -1, -1);



                // Create an AnimatorFactory instance, which will manage

                // targets for its corresponding Motion.

                var __animFactory_mc:AnimatorFactory = new AnimatorFactory(__motion_mc);

                __animFactory_mc.transformationPoint = new Point(0.498837, 0.498529);

                      __animFactory_mc.addTarget(mc, 1);

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


            • 3. Re: Motion presets Not Working on Mac System
              Ankit_Gupta Level 1

              I have solve that Problem .


              Above Motion Preset  Perfectly Working on Window but there is only one change that is You should assign __animFactory_mc variable private above


              just like this >>>>>

              private var __animFactory_mc:AnimatorFactory;




              __animFactory_mc = new AnimatorFactory(__motion_mc);




              and remain are same


              Than this Motion Preset Working In Mac System.


              Message was edited by: Ankit_Gupta