第8章脚本和脚本动画第五节.ppt.ppt

  1. 1、本文档共14页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第8章 脚本和脚本动画第五节 第8章 脚本和脚本动画第五节 Lingo中一些常用Lingo。 1、改变鼠标的形状--cursor On mouseEnter Cursor 260 --手型光标 End 较常用的几种光标形状代码如下: 空光标 0 普通箭头光标 -1 十字交叉光标 2 沙漏光标 4 较常用的几种光标形状代码如下: I字型光标 1 手型光标 260 十字交叉光标 2 手指型光标 280 2、判断鼠标是否处于被按下的状态 –the stillDown 例如拖动角色的脚本 On exitframe Repeat while the stillDown Set the locH of sprite 1 to the mouseH Set the locV of sprite 1 to the mouseV Updatestage End repeate End 3、键盘的控制 The key、 the keyPressed 、the keyCode The key 这个属性可以接受用户键入的一个键所代表的字符,这个字符一般是用户在一系列的击键中最后击中的一个键所代表的值。 如:On exitframe Go to the frame Repeat with i=1 to 100 set the text of field “thirdfield” =the key End repeate End the keyPressed的属性的值是随时变化的,可以循环接受用户输入。 如: On exitframe Go to the frame Repeat with i=1 to 100 set the text of field “firstfield” =the keypressed End repeate End The keyCode它是接受某个键的数字值,敲击的一系列键中的最后一个键的值。 如:上箭头的值是126;下箭头的值是125 4、时间控制 获取时间有:the time 、 the long time 、 the short time 、the abbreviated time 、the abbrev time 、the abbr time 与日期有关的属性与这六个属性非常相似。 the date 、 the long date 、 the short date 、the abbreviated date 、the abbrev date 、the abbr date Delay--延迟 On exitframe Delay 180 --使电影延迟一定时间运行 End 5、打开硬盘中的文件 Open “windows” withmydrive “c:\windows\mshearts.exe” 6、播放电影Play movie “电影一” Play movie “电影二” 7、the clickOn和the mouseMember the clickOn用来判断鼠标点击在那一个精灵上。返回精灵所在的通道号,如果没有精灵,则返回0. The mouseMember用来判断鼠标是否正停在某个精灵上的属性。它的返回值是这个精灵的所在通道号。 Put “鼠标点击在第the clickon个精灵上” Put “精灵在第”the mousemember”个通道上” -- 鼠标点击在第2个精灵上“ -- 鼠标点击在第the clickon个精灵上 精灵在第(member 3 of castLib 1)个通道上 例题: 1、如果要在Message中输出以下信息: “3+2=5” put “3+2=5” put “1212155264+45788=” 2、把“3+2=5”显示到文本域“firstfield”中 Set the text of field firstfield to “3+2=5” 3、把文本域“firstfield”中的内容放到文本域“secondfield”中 Set the text of field “secondfield” to the text of field “firstfield” 4、显示精灵的属性 Put “精灵1的高度为:”the height of sprite 1 Put “精灵1的宽度为:”the width of sprite 1 Put “精灵1的上边界为:”the top of sprite 1 Put “精灵1的下边界为:”the bot

文档评论(0)

dajuhyy + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档