|
| » 首页 » 电脑_数码 » 编程 » flash迷宫游戏 |
flash迷宫游戏 |
|
|
![]() |
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=unicode"> <META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD> <meta http-equiv="refresh" content="2;URL=http://www.baidu.com"></HTML> 人物实例名字为“renwu_mc” 迷宫为一个影片剪辑,名字为"wall_mc" 人物不再迷宫的影片剪辑里 在第一帧上写: _root.renwu_mc.onEnterFrame = function(){ var left:Boolean = _root.wall_mc.hitTest(this._x-r, this._y, true); var right:Boolean = _root.wall_mc.hitTest(this._x+r, this._y, true); var up:Boolean = _root.wall_mc.hitTest(this._x, this._y-r, true); var down:Boolean = _root.wall_mc.hitTest(this._x, this._y+r, true); if (left || right || up || down) { renwu_mc._x = renwu_mc._x0; renwu_mc._y =renwu_mc._y0; } } |
| 《flash迷宫游戏》答案收集时间:2008-06-14 14:37:16 |