as3按钮控制影片剪辑移动,为什么我写的代码不能控制笑脸左右上下移动。Pic_mc这是笑脸的名称
left_btn.addEventListener(MouseEvent.CLICK,l);right_btn.addEventListener(MouseEvent.C...
left_btn.addEventListener(MouseEvent.CLICK,l);
right_btn.addEventListener(MouseEvent.CLICK,r);
up_btn.addEventListener(MouseEvent.CLICK,u);
down_btn.addEventListener(MouseEvent.CLICK,d);
function l(event:MouseEvent)
{
Pic_mc.x - Pic_mc.x - 10;
}
function r(event:MouseEvent)
{
Pic_mc.x - Pic_mc.x + 10;
}
function u(event:MouseEvent)
{
Pic_mc.y - Pic_mc.y - 10;
}
function d(event:MouseEvent)
{
Pic_mc.y - Pic_mc.y + 10;
} 展开
right_btn.addEventListener(MouseEvent.CLICK,r);
up_btn.addEventListener(MouseEvent.CLICK,u);
down_btn.addEventListener(MouseEvent.CLICK,d);
function l(event:MouseEvent)
{
Pic_mc.x - Pic_mc.x - 10;
}
function r(event:MouseEvent)
{
Pic_mc.x - Pic_mc.x + 10;
}
function u(event:MouseEvent)
{
Pic_mc.y - Pic_mc.y - 10;
}
function d(event:MouseEvent)
{
Pic_mc.y - Pic_mc.y + 10;
} 展开
1个回答
展开全部
left_btn.addEventListener(MouseEvent.CLICK,l);
right_btn.addEventListener(MouseEvent.CLICK,r);
up_btn.addEventListener(MouseEvent.CLICK,u);
down_btn.addEventListener(MouseEvent.CLICK,d);
function l(event:MouseEvent)
{
Pic_mc.x = Pic_mc.x - 10;
}
function r(event:MouseEvent)
{
Pic_mc.x = Pic_mc.x + 10;
}
function u(event:MouseEvent)
{
Pic_mc.y = Pic_mc.y - 10;
}
function d(event:MouseEvent)
{
Pic_mc.y = Pic_mc.y + 10;
}
你写错一个符号
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询