| 设置首页 收藏站点 关于我们 联系站长

 | 首页 | 教程 | 脚本 | 博客 | 娱乐 | 图库 | 音效 | 软件 | 教案 | 论文 | 试题 | 课件 | 影视 | 

|| 您现在的位置: 课件大师 >> 教程 >> Director >> 正文
普通教程flash十万个为什么
普通教程[组图]FLASH教程下载
普通教程如何在 Director 中播
普通教程搜索引擎优化(SEO)技
普通教程首页根据分辨率的大小
普通教程flash中利用setMask(
普通教程flash怎么样实现在让
普通教程flash菜单中缓冲移动
普通教程JS实现浏览器菜单命令
普通教程Flash对联广告及关闭
推荐教程flash实现快进10帧和
推荐教程[组图]PPT课件制作:
推荐教程[组图]用Flash制作螺
推荐教程[组图]Flash制作视觉
推荐教程AW课件制作实例:游戏
推荐教程[图文]AW课件制作实例
推荐教程[图文]PPT特效动画实
推荐教程FLASH调用外部文件的
推荐教程[组图]动画短片制作常
推荐教程[组图]硕思闪客精灵M
制作多媒体网页
制作多媒体光盘
制作多媒体光盘
制作多媒体光盘
决斗时刻游戏制
决斗时刻游戏制
决斗时刻游戏制
拿硬币游戏制作
拿硬币游戏制作
拿硬币游戏制作

鼠绘教程五:凉椅上

鼠绘教程四:忧郁的

鼠绘教程三:挥手的

鼠绘教程二:扮酷的

[组图]决斗时刻游戏制作(2)         
决斗时刻游戏制作(2)
副标题:
作者:佚名 文章来源:互联网 点击数: 更新时间:2005-9-25 10:19:53
本文由课件大师网站收集、整理或撰写,转载请署原作者名,并请注明出处,谢谢合作!

(11) 下面为每一个敌人精灵添加精灵脚本,选中左上角窗口的敌人精灵,单击右键,在快捷菜单中选择Script命令,打开Script窗口为其添加以下的Lingo语句,如图8-103所示。

global myscore

on mouseUp

  puppetsound 2,"shoot1"

  set the member  of sprite 2 to "dead"

  updatestage

  mytick=the ticks

 

  repeat while 1

    if the ticks-mytick>15 then

      exit repeat

    end if

  end repeat

  sprite(2).visible=0

  set the member of sprite 2 to "enemy"

  myscore=myscore+10

  set the text of field "field1" to string(myscore)

  go to "1"

end

8-103  1个敌人精灵脚本

(12) 选中左上角窗口的第2个敌人精灵,打开Script窗口为其添加以下的Lingo语句,如图8-104所示。

global myscore

on mouseUp

    puppetsound 2,"shoot1"

  set the member  of sprite 3 to "dead"

  updatestage

  mytick=the ticks

 

  repeat while 1

    if the ticks-mytick>15 then

      exit repeat

    end if

  end repeat

  sprite(3).visible=0

  set the member of sprite 3 to "enemy"

  myscore=myscore+10

  set the text of field "field1" to string(myscore)

  go to "1"

end

8-104  精灵脚本

(13) 对比这两个精灵脚本程序,它们是非常相似的。只不过将所有涉及精灵2的地方都换为精灵3。以此类推将其他几个精灵的脚本程序设置好,在此就不详细列出了。

(14) Ctrl+6组合键,弹出Text窗口,设置字体和大小,输入文本“得分:”,如图8-105所示。

8-105  输入文本“得分:”

(15) 单击窗口左上角的“+”按钮,创建新的窗口,输入文本“生命:”,如图8-106所示。

8-106  输入文本“生命”

(16) 单击窗口左上角的“+”按钮,创建新的窗口,设置字体和大小,输入文本“简单”,如图8-107所示。

8-107  输入文本“简单”

(17) 单击Cast Member Script按钮,输入以下Lingo语句,如图8-108所示。

global level

on mouseUp

  level=120

  go to "1"

end

on mouseEnter

  sprite(19).forecolor=0

end mouseEnter

on mouseleave

  sprite(19).forecolor=255

end mouseleave

8-108  文本“简单”的脚本程序

(18) 创建新的窗口,设置字体和大小,输入文本“一般”。单击Cast Member Script按钮,输入以下Lingo语句,如图8-109所示。

global level

on mouseUp

  level=90

  go to "1"

end

on mouseEnter

  sprite(20).forecolor=0

end mouseEnter

on mouseleave

  sprite(20).forecolor=255

end mouseleave

8-109  文本“一般”的脚本程序

(19) 创建新的窗口,设置字体和大小,输入文本“高难”。单击Cast Member Script按钮,输入以下Lingo语句,如图8-110所示。

global level

on mouseUp

  level=60

  go to "1"

end

on mouseEnter

  sprite(21).forecolor=0

end mouseEnter

on mouseleave

  sprite(21).forecolor=255

end mouseleave

8-110  文本“高难”的脚本程序


教程录入:潜龙在野    责任编辑:潜龙在野 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    (只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 |

    网站维护:潜龙 QQ:20885537 Email:WebMaster#PowerCai.Com备案编号:渝ICP备05001729号