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

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

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

鼠绘教程五:凉椅上

鼠绘教程四:忧郁的

鼠绘教程三:挥手的

鼠绘教程二:扮酷的

[组图]决斗时刻游戏制作(4)         
决斗时刻游戏制作(4)
副标题:
作者:佚名 文章来源:互联网 点击数: 更新时间:2005-9-25 10:25:41

(31) 双击Script通道的第16帧,打开Script窗口,输入以下Lingo语句,如图8-121所示。

global which

global myticks

global life

global myscore

global level

on exitFrame

  if the ticks-myticks>level then

    set the visible of sprite 22 to 1

    updatestage

    set the visible of sprite 22 to 0

    life=life-1

    set the text of field "field2" to string(life)

   

    if life<=0 then

      --  alert "you loose"

      go to "2"

      exit

    end if

    myticks=the ticks

    put life

  end if

  sprite(which).visible=1

  go to the frame

end

on enterframe

  if myscore>200 then

    level=90

  end if

  if myscore>400 then

    level=60

  end if

  if myscore>=600 then

    go to "3"

  end if

end

on mouseUp

  puppetsound 2,"shoot1"

end mouseUp

8-121  16Lingo脚本

(32) 双击Script通道的第25帧和第35帧,打开Script窗口,输入以下Lingo语句,如图8-122所示。

on exitFrame me

  go to the frame

end

8-122  25帧和第35Lingo脚本

(33) 为精灵1(封面)添加以下Lingo语句,如图8-123所示。

on mouseUp me

    go to "0"

end

8-123  精灵1Lingo脚本

(34) 最后,编写以下电影脚本程序,对整个游戏程序进行初始化,如图8-124所示。

global life

global myscore

on startMovie

    sprite(21).forecolor=255

  life=5

  myscore=0

  sprite(22).visible=0

  set the text of field "field2" to string(life)

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

  repeat with x=1 to 9

    sprite(x+1).visible=0

   

  end repeat

  cursor 3

end startMovie  

8-124  电影脚本程序

(35) 至此,“决斗时刻游戏”制作完成,播放效果如图8-125所示。

8-125  “决斗时刻游戏”播放效果


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

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

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