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

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

|| 您现在的位置: 课件大师 >> 教程 >> 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-19 10:52:50

至此舞台上精灵的大小、位置等属性已设置完成。下面将通过Lingo语句,控制计时器的使用。

(17) 在工作窗口单击工具栏中的Script按钮,弹出Script窗口。设置脚本类型为Movie,在其中输入以下全局变量,如图8-13所示。

global timerhour

global timerminute

global timersecond

8-13  数值全局变量

(18) Script窗口,加入以下settime句柄的Lingo控制语句,如图8-14所示。

on settime

  set total = the timer/60

  set timerhour= total /3600

  set total = total - timerhour*3600

  set timerminute = total/60

  set timersecond = total-timerminute*60

end

8-14  settime句柄

(19) Script窗口,加入以下changesprite句柄的Lingo控制语句,如图8-15所示。

on changesprite

  set h1=timerhour/10

  set h2=(timerhour-h1*10)

  set m1=timerminute/10

  set m2=(timerminute-m1*10)

  set s1=timersecond/10

  set s2=(timersecond-s1*10)

 

  if (the castnum of sprite 5 = 2) then

    set the width of sprite 5=2

  else

    set the width of sprite 5 = 22

  end if

 

  if (the castnum of sprite 6 = 2) then

    set the width of sprite 6=2

  else

    set the width of sprite 6 = 22

  end if

 

  set the member of sprite 1 to member(h1+1)

  set the member of sprite 2 to member(h2+1)

  set the member of sprite 3 to member(m1+1)

  set the member of sprite 4 to member(m2+1)

  set the member of sprite 5 to member(s1+1)

  set the member of sprite 6 to member(s2+1)

  updatestage

end

8-15  changesprite句柄

(20) 在舞台窗口中右击文本Reset,在弹出的快捷菜单中选择Script命令,在弹出的窗口中输入以下Lingo控制语句,如图8-16所示。

on mouseUp me

  starttimer

end

8-16  精灵12Lingo脚本

(21) Score窗口的Script通道中,双击第1帧。在弹出的窗口中,加入以下的Lingo控制语句,如图8-17所示。

on exitFrame me

  go to the frame

end

 

on idle

  settime

  changesprite

end

8-17  1Lingo脚本

(22) 至此,计时器动画的制作完成了。播放效果如图8-18所示。

8-18  计时器播放效果


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

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

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