flash as3,人(hen

flash AS3,\u5982\u4f55\u89e6\u78b0\u6309\u94ae\u8df3\u8f6c\u5230\u6307\u5b9a\u5e27

\u89e6\u78b0\uff1a
function broll (event:MouseEvent){
gotoAndStop(\u6307\u5b9a\u7684\u5e27);
}
\u6309\u94ae.addEventListener(MouseEvent.MOUSE_OVER,broll);//MOUSE_OVER\u4e5f\u53ef\u4ee5\u662fROLL_OVER

\u89e6\u78b0\u79bb\u5f00\uff1a
function broll (event:MouseEvent){
gotoAndStop(\u6307\u5b9a\u7684\u5e27);
}
\u6309\u94ae.addEventListener(MouseEvent.MOUSE_OUT,broll);//MOUSE_OUT\u4e5f\u53ef\u4ee5\u662fROLL_OUT

\u697c\u4e0a\u7684\u56de\u7b54\u601d\u8def\u660e\u786e\uff0c\u518d\u5df2\u8bbe\u5b9a\u4e00\u4e2a\u6761\u4ef6\u505a\u5faa\u73af\u5c31\u80fd\u5b9e\u73b0\u4e86\uff0c\u5982\u91c7\u7528\u8ba1\u5206\u4ee3\u7801\u6a21\u5757\u4e3a\u6761\u4ef6\uff0c\u6bcf\u589e\u957f\u4e00\u5206\u4ee3\u7801\u5faa\u73af\u4e00\u6b21\u3002\u8bd5\u8bd5\u5427

你碰撞的代码都写好了。。。。里面加上gotoAndStop(2)不就可以了吗。。。
if (walls.hitTestPoint(getBounds(stage).left,y,true))
{
x += sp;
gotoAndStop(2) ;
}
if (walls.hitTestPoint(getBounds(stage).right,y,true))
{
x -= sp;
gotoAndStop(2) ;
}
if (walls.hitTestPoint(x,getBounds(stage).top,true))
{
y += sp;
gotoAndStop(2) ;
}
if (walls.hitTestPoint(x,getBounds(stage).bottom,true))
{
y -= sp;
gotoAndStop(2) ;
}

扩展阅读:adobe flash player ... adobeflash手机版下载 ... flash大厅登录网站入口 ... flash苹果版下载安装 ... quick as a flash ... flash player 8 ... photon flash player ... shockwave flash ... flash player版本过旧 ...

本站交流只代表网友个人观点,与本站立场无关
欢迎反馈与建议,请联系电邮
2024© 车视网