Skip to main content
Participating Frequently
Jan 23, 2014 3:40 AM UTC
Question

orientToBezier not work in TweenMax when -useLegacyAOT=no

The TweenMax orientToBezier do not work correctly on the idevice if I use  -useLegacyAOT=no

package

{

    import com.greensock.TweenMax;

    import com.greensock.easing.Linear;

   

    import flash.display.Sprite;

    import flash.display.StageAlign;

    import flash.display.StageScaleMode;

    import flash.events.Event;

   

    [SWF(frameRate="60", width="960", height="640", quality="LOW", backgroundColor="0x000000")]

    public class TEST_TweenMaxRotation extends Sprite

    {

        private var sp:Sprite;

       

        public function TEST_TweenMaxRotation()

        {

            super();

           

            stage.align = StageAlign.TOP_LEFT;

            stage.scaleMode = StageScaleMode.NO_SCALE;

           

            this.addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);

        }

       

        protected function addedToStageHandler(event:Event):void

        {

            this.removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);

            initApp();

        }

       

        private function initApp():void

        {

            sp = new Sprite();

            addChild(sp);

           

            sp.graphics.clear();

            sp.graphics.beginFill(0x0099FF);

            sp.graphics.drawRect(-50, -10, 100, 20);

            sp.graphics.endFill();

           

            var path:Array = [{x:600, y:300},

                {x:400, y:100},

                {x:100, y:500}];

           

            TweenMax.to(sp, 5, {bezierThrough:path,

                                orientToBezier:true,

                                ease:Linear.easeNone});

        }

    }

}

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Jan 23, 2014 6:38 AM UTC

Hi,

I executed above mentioned code with both values of -useLegacyAOT i.e. 'yes' & 'no' , but there is not visible difference in the motion of blue rectangle in the app.

Could you please specify what do you mean by "The TweenMax orientToBezier do not work correctly"  ?

Thanks,

Ankit

Translate
kingnareAuthor
Participating Frequently
Jan 23, 2014 1:38 PM UTC

Sorry for lack of details.

My environment: Windows 8(x64), FB4.7(trial), AIR 4.0 (build 1390)

CPU: T5600

-useLegacyAOT yes

Value of the blue rectangle's rotation is OK, move and rotate along the path.


-useLegacyAOT no

The value of rotation is 0(more or less).This is not the value I want.


Greesock is complicated and I can not find the issue.

Thank you for your reply.



Translate
Nimisha1
Participating Frequently
Sep 2, 2014 5:25 AM UTC

Hi kingnare,

Please use the latest AIR 15 build Download Adobe AIR 15 Beta - Adobe Labs as that should solve your problem. Let us know if you face any issues with the new fast packager.

-Nimisha

Translate