首页 > 专家说

flashas3如何设置鼠标滑过mc(含图片按钮)设置mc跟随鼠标方向移动,点击图片固定位置显示大图

来源:新能源网
时间:2024-08-17 10:22:59
热度:

flashas3如何设置鼠标滑过mc(含图片按钮)设置mc跟随鼠标方向移动,点击图片固定位置显示大图【专家解说】:我来告诉你标准答案!mc.addEventListener(Mou

【专家解说】:我来告诉你标准答案!mc.addEventListener(MouseEvent.MOUSE_OVER,mcGensui);functionmcGensui(e:MouseEvent):void{mc.removeChild(MouseEvent.MOUSE_OVER,mcGensui);mc.x=mouseX;mc.y=mouseY;mc.addEventListener(MouseEvent.CLICK,showPic);}functionshowPic(e:MouseEvent):void{mc.removeEventListener(MouseEvent.CLICK,showPic);mc.x=stage.stageWidth/2;mc.y=stage.stageHeight/2;}