下面的代码,使用TweenMax的onUpdate方法this.detaibaseInfo2=newSprite();with(detaibaseInfo2){x=30;y=700;with(graphics){beginFill(0x826b45,1);drawRect(0,0,240,20);endFill();}}addChild(detaibaseInfo2);TweenMax.to(detaibaseInfo2,0.2,{y:260,onUpdate:detaibaseInfo2Update,ease:Strong.easeOut});但是测试了一下:privatefunctiondetaibaseInfo2Update():void{trace("detaibaseInfo2.y="+detaibaseInfo2.y);if(detaibaseInfo2.y<270){othercode...}}输出的结果是:[trace]detaibaseInfo2.y=399.7[trace]detaibaseInfo2.y=399.7[trace]detaibaseInfo2.y=399.7[trace]detaibaseInfo2.y=399.7[trace]detaibaseInfo2.y=399.7[trace]detaibaseInfo2.y=291.45[trace]detaibaseInfo2.y=263.25[trace]detaibaseInfo2.y=260.05[trace]detaibaseInfo2.y=260有个疑惑:为什么detaibaseInfo2的y属性数值不是从700到260的递减呢?
慕妹3242003
芜湖不芜
相关分类