|
主题: 常用Lingo命令和函数
|
 5D困丫
职务:普通成员
等级:4
金币:10.0
发贴:1206
注册:2001/1/5 11:29:23
|
#12001/11/23 15:21:29
1.set 句法:set variable Or Property=value set variable Or Property to value 实例:set Myname=“goodle” set命令命名一个变量或属性,并把它设置为某值。 2.the clickon 句法:the clickon 实例:if the clickon=1 then go “Main Menu” 函数the clickon将返回最近一次单击精灵通道的通道号。若在舞台上单击,则the clickon函数的返回值是0 3.puppetSound 句法:puppetSound[sound Channel,]”castName” 实例:puppetSound“B Applause” updateStage puppetSound1,“Applause” puppetSound2,“Wolf” updateStage puppetSound通过Lingo在指定的声音通道中播放声音。缺省时,puppetSound控制声音通道1。 4.Sound playFile 句法:sound playFile soundChannnel,“filename” 实例:sound playFile2,“Wolf” 调用外部声音。 5.updateStage 句法:updateStage 实例:puppetSound “Applause” updateStage 用Lingo对精灵或操纵的声音通道所作出的改变直到使用updateStage命令时才会注册。 6.the loc of sprite sprite/point() 句法:the loc of sprite spriteNumber point (horizontal,vertical) 实例:set the lock of sprite 10=point(100,200) the loc of sprite是精灵属性,用它可以确定精灵在舞台上的位置,即相对于舞台左上角的位置。 7.repeat while 句法:repeat while condition statement1 statement2 end repeat 实例:repeat while 当条件不在是TRUE时,repeat while才会结束循环。 8.go 句法:go[to][frame]frameNumberOrLabel go[to][frame]frameNumberOrLabel of movieName go[to]movie movieName 实例:go to 1 将播放头移到当前电影的第1帧 go to frame “first frame” 将播放头移到当前电影中标有“first frame”的帧 go frame (the frame) 将播放头移到当前帧循环 go movie“my movie” 将播放头移到名叫“my movie”电影的第一帧。 Go frame“third frame“of movie”my movie” 将播放头移到名叫“my movie”电影中标有“of movie”的帧 9.play 句法:play [frame]frameNumberOrLabel play [frame]frameNumberOrLabel of movieName play movie movieName 实例:play 3 将播放头移到当前电影的第3帧 play frame“first frame” 将播放头移到当前电影中标有“first frame”的帧 play movie“my movie” 将播放头移到电影名叫“my movie”的第一帧 注意::用go 命令,不返回;用play命令,可以返回。 10.quit 句法:quit 实例:on enterFrame global timeAllowde if the timeAllowed cleanup quit end if end 11.global 句法:global variableName 实例:global highSpeed 将变量highSpeed说明为全局变量。 12.the cursor of sprite 句法:set the cursor of sprite channelNumber to list 实例:set the cursor of sprite 3 to [10,10] “set the cursor of sprite”命令可以使定制光标显示在舞台上的精灵上,该命令适用用整个通道,而不只是某一帧的精灵。 要关闭定制光标,可将精灵的定制光标设置为0,代码如下: set the cuisor of sprite 10 to 0 13.append 句法:append list,value 实例:append groceryList,“lima beans” put groceryList 使用append命令能将指定的项附加到列表的末尾。 14.count 句法:count(list) 实例:put count(groceryList) 使用count命令能够返回指定列表中的项数。 15.getAt 句法:getAt(list,position) 实例:if getAt(groceryList,2)=“lima beans”then beep getAt命令将返回在指定位置上的列表项值。
|
 老天
职务:普通成员
等级:1
金币:0.0
发贴:150
注册:2001/10/12 10:22:15
|
#22001/11/23 15:56:38
我加了你的oicq !可是没有回音:(
|
 hacker hacking
职务:普通成员
等级:4
金币:10.0
发贴:1629
注册:2001/9/30 15:55:46
|
#32001/11/25 2:31:51
可以解释一下吗? 看不懂呀
|
 飘雪无痕
职务:普通成员
等级:2
金币:1.0
发贴:514
注册:2000/11/8 14:55:33
|
#42001/11/26 11:01:18
我觉得对于新手学习Lingo语言很有帮助。很感谢你。
|
 rainy_5d
职务:普通成员
等级:2
金币:1.0
发贴:225
注册:2000/10/23 19:44:16
|
#52001/11/26 20:36:21
1、在7.0和以后的版本中,赋值可以不用set关键字。 x=9 方便多了。 2、也可以象别的语言那样使用数组而不用getAt y=[1,2,5,6] x=y[3] put x --x=5
编辑历史:[这消息被rainy编辑过(编辑时间2001-11-26 20:40:46)]
|
 angelww
职务:普通成员
等级:1
金币:0.0
发贴:12
注册:2002/1/14 19:44:09
|
#62002/1/17 19:24:32
好东西,Thanks!
|
 zpjiebu
职务:普通成员
等级:1
金币:0.0
发贴:8
注册:2002/1/17 11:04:37
|
#72002/1/20 17:21:18
你们好!我是新手,想自学LINGO,不知怎么学?可否赐教! 我的E-mail:xsfh2000@163.net 谢谢!
|
 zpjiebu
职务:普通成员
等级:1
金币:0.0
发贴:8
注册:2002/1/17 11:04:37
|
#82002/1/20 17:22:48
差点忘了,我QQ是8591600
|
 sbljx
职务:普通成员
等级:1
金币:0.0
发贴:30
注册:2001/12/13 14:03:12
|
#92002/1/22 9:14:09
zpjiebu在上个帖子中说 引用: 你们好!我是新手,想自学LINGO,不知怎么学?可否赐教! 我的E-mail:xsfh2000@163.net 谢谢!
想学lingo到奥古论坛来吧! http://www.aougu.com/bbs/
|