rotation和简易动画

rotation和简易动画

作者:LAMP小白  点击:1810  发布日期:2012-10-19 00:07:00  返回列表

昨天本来就能搞定,但是子对象灰常纠结,老是选不中啊选不中

Page1.person1.leftEye 一直为空,可能是我在建立剪辑的时候出了问题,所以只有直接选了



代码

package
{
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
       
    public class Main extends MovieClip
    {
        var Page1:page1;
           
        public function Main()
        {
            Page1 = new page1();
            addChild(Page1);
            Page1.haha.stop();
            Page1.eyesBtn.addEventListener(MouseEvent.CLICK, mioEye);
            Page1.haha.addEventListener(MouseEvent.MOUSE_OVER, hahaGo);
            Page1.haha.addEventListener(MouseEvent.CLICK, hahaSay);
        }
           
        public function hahaGo(event:MouseEvent):void
        {
            Page1.haha.gotoAndStop(2);
            Page1.haha.removeEventListener(MouseEvent.MOUSE_OVER, hahaGo);
        }
           
        public function hahaSay(event:MouseEvent):void
        {
            Page1.haha.gotoAndStop(3);
            Page1.haha.removeEventListener(MouseEvent.CLICK, hahaSay);
        }
           
        public function mioEye(event:MouseEvent):void
        {
            Page1.leftEye.rotation += 50;
            Page1.rightEye.rotation += 50;
        }
    }
}




上一篇:统计查询 下一篇:快递查询API
0