- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第8章 脚本和脚本动画第五节.ppt
第8章 脚本和脚本动画第五节;第8章 脚本和脚本动画第五节;较常用的几种光标形状代码如下:
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个精灵上;;例题:
1、如果要在Message中输出以下信息:
“3+2=5”;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 bottom of sprite 1
Put “精灵1的左边界为:”the left of sprite 1
Put “精灵1的右边界为:”the right of sprite 1
Put “精灵1的前景色为:”the forecolor of sprite 1
;4、显示精灵的属性
Put “精灵1的角度为:”the rotation of sprite 1
Put “精灵1的扭曲度为:”the skew of sprite 1
Put “精灵1的混合度为:”the blend of sprite 1
Put “精灵1的混合度为:”the blend of sprite 1
Put “精灵1的水平坐标为:”the loch of sprite 1
Put “精灵1的垂直坐标为:”the locv of sprite 1
Put “鼠标所在的坐标为:” the mouseloc
;5、鼠标取词
(1)求出鼠标在文本域中指向单词的位置
put “鼠标指向第”the
文档评论(0)