主题:  第3组call~controldown

我是小马

职务:普通成员
等级:3
金币:17.0
发贴:794
#12000/12/13 20:05:28
1、controlDown:
语法:the controldown
描述:
函数;监测Ctrl键是否按下(按下为TRUE)。
你可以将controlDown函数和the key函数一起使用来监测Control键和其它键的组合。在用Java的director电影播放器播放影片时,这个函数仅仅当第二个键和Control同时按下时才返回真值(TRUE),如果只有Control键被按下,controlDown函数返回FALSE。Java的director电影播放器支持其它键和control键组合使用,然而,浏览器是在影片之前接受按键动作,因而浏览器会在影片之前截获按键事件作出反应。
在director帮助里有关于键盘lingo的示范影片。
实例:
这个on keyDown处理程序检测按下的键是否是Control键,如果是,这个程序就激活on doControlKey处理程序。参数(the key)鉴别除了control键外有那个键被按下。
on keyDown
if (the controlDown)then doControlKey (the key)
end
参见:charToNum(), commandDown, key(), keyCode(), optionDown, shiftDown

………………………………………………………………………………………
2、:continue:
This is obsolete. Use go to the frame +1.
这是旧的命令。用途是播放头转到下一帧(go to the frame + 1)

×××××××××××××××××××××××××××××××××××××××××××××××××××
3、contains
语法:stringExpression1 contains stringExpression2
描述:
操作符,比较两个字符串并判断字符串1是否包含字符串2,包含为真(TRUE)。
这个包含比较操作符具有最高优先级。
这个比较操作符被用于用户是否输入了特殊的字符或字符串。你也可以用它来搜索一个或者更多的字符是否在特殊的字符串中。
实例:
这个例子判断字符阿拉伯数字。
on isNumber aLetter
digits = "1234567890"
if digits contains aLetter then
return TRUE
else
return FALSE
end if
end
注意:字符串比较不区分大小写,“a”和“A”是等同的。
参见:offset() (string function), starts


编辑历史:[这消息被mzgjingsi编辑过(编辑时间2000-12-13 21:18:56)]
[这消息被mzgjingsi编辑过(编辑时间2000-12-14 22:13:47)]
[这消息被mzgjingsi编辑过(编辑时间2000-12-14 22:14:46)]


我是小马

职务:普通成员
等级:3
金币:17.0
发贴:794
#22001/1/18 19:13:57
call
语法:call #handlerName, script, {args...}
call (#handlerName, scriptInstance, {args...})
描述:命令;在指定脚本中发送一个处理处理程序命令。其程序名(handlerName)即被激活的程序,脚本(script)指当前脚本或列表脚本。Args是可传到调用程序的可选参数。如脚本是单个的脚本实例,在祖脚本中未对处理程序进行定义,就会出现错误提示。
如果脚本是一列脚本实例,那么信息会依次传入这列脚本中的每个脚本。如果在祖脚本中未对处理程序进行定义,将不会有出错提示。呼叫命令可以识别处理程序的各种变化名称。通过呼叫传递的信息将不会传给sprite中的其它脚本、演员成员脚本、帧脚本或电影脚本。
实例:这个处理程序发送信息给sprite1的行为脚本。
on mouseDown me
-- get the reference to the first behavior of sprite 1(得到sprite 1的第一个行为指令。)
set xref = getAt (the scriptInstanceList of sprite 1
-- run the bumpCounter handler in the referenced script,(运行指定脚本中的bumpcounter处理程序。)
-- with a parameter
call (#bumpCounter, xref, 2)
end
实例:此例表明一个呼叫语句是怎样呼叫祖脚本或父脚本行为中的l处理程序
这是父脚本
-- script Man
property ancestor
on new me
set ancestor = new(script "Animal", 2)
return me
end
on run me, newTool
put "Man running with "&the legCount of me&" legs"
end

这是祖先脚本。
-- script Animal
property legCount
on new me, newLegCount
set legCount = newLegCount
return me
end
on run me
put "Animal running with "& legCount &" legs"
end
on walk me
put "Animal walking with "& legCount &" legs"
end
以下语句使用父脚本或祖脚本。这一语句创建了一个父脚本实例。
set m = new(script "man")
This statement makes the man walk:
call #walk, m
-- "Animal walking with 2 legs"
This statement makes the man run:
set msg = #run
call msg, m
-- "Man running with 2 legs and rock"
这一语句创建了父脚本的第二个实例。
set m2 = new(script "man")
这一语句发送信息这两个父脚本实例。
call msg, [m, m2]
-- "Man running with 2 legs "
-- "Man running with 2 legs "


××××××××××××××××××××××××××××××××××××
callAncestor
语法: callAncestor handlerName, script, {args...}
描述: 命令;发送信息给一个子对象的父脚本,处理程序名为被激活的处理程序名,脚本指脚本实例或列表脚本实例。Args 是可传至这一处理程序的可选参数。)
如果脚本是一个单独的脚本实例,在祖脚本中未对处理程序定义时,出现错误提示。
如果脚本是一列脚本实例,信息将依次传到脚本列表中的每一个脚本。这时,如果在祖脚本中未定义处理程序,也不会有错误提示。
祖脚本也分别有它们的祖脚本。
当你使用callAncestor时,处理程序名是可变的,你可以完全忽略原始脚本中的处理程序,直接转到祖脚本中。
实例:此例说明callAncestor语句怎样call(行为脚本或父脚本中的)祖脚本的处理程序。
这是父脚本
-- script "man"
property ancestor
on new me, newTool
set ancestor = new(script "Animal", 2)
return me
end
on run me
put "Man running with "&the legCount of me&"legs"
end
这是祖先脚本
-- script "animal"
property legCount
on new me, newLegCount
set legCount = newLegCount
return me
end
on run me
put "Animal running with "& legCount &" legs"
end
on walk me
put "Animal walking with "& legCount &" legs"
end

以下语句使用父脚本或祖脚本。这一语句创建了一个父脚本实例。
set m = new(script "man")
This statement makes the man walk:
call #walk, m
-- "Animal walking with 2 legs"
This statement makes the man run:
set msg = #run
callAncestor msg, m
-- "Animal running with 2 legs"
这一语句创建了第二个父脚本实例
set m2 = new(script "man")
这一语句发送信息给两个父脚本实例。
callAncestor #run,[m,m2]
-- "Animal running with 2 legs"
-- "Animal running with 2 legs"
参见: ancestor, new()


××××××××××××××××××××××××××××××××
cancelIdleLoad
语法:cancelIdleLoad loadTag
描述:命令;取消所有具有指定装载标记的演员成员装载。
实例:这一语句卸载标记为20的演员
cancelIdleLoad 20
See also idleLoadTag
×××××××××××××××××××××××××××××××××
case
语法: case expression of
expression1 : Statement
expression2 :
multipleStatements.
expression3, expression4 :
Statement
{otherwise:
statement(s)}
end case
描述:关键字;开始一个多枝的逻辑结构,这一结构比起重复“if...then”语句要简单容易得多。
与线型表达式相比,case表达式中的lingo语言,其价值在于从开始直至全过程,每一行按顺序地给出表达式,直到找到与case表达式相匹配的表达式。
当lingo找到与之相配的表达式,它将在表达式的冒号后面执行相应的语句或语句串,如果表达式后只出现一个语句,那么表达式与语句同行出现,如果出现多条语句,那么这些语句将在相应的表达式下呈锯齿状排列。
如果有一个以上的表达式可以使lingo执行同样的语句,这些表达式一定会被逗号隔开。包含表达式3和表达式4的语法行可以说明这种情况。当lingo碰到第一个合适的表达式,它将停止实验其它相称的表达式。如果case结构的末尾包含了其它可选的语句,又没有相称的表达式,那么后面的其它语句将会被执行。
如果一个case语句实验不为整数。那么Java会把这一case语句转化为“if…then”语句。
实例:以下程序检验最近按下的键为何键,这一按键行为有何反应。
如果用户按下A键,影片跳转到标记为“Apple”的帧,如果用户按下B键或者C键,则影片执行指定的转场效果后跳转到标记为“Oranges”的帧,如果用户按下其它任何键,电脑发出beep声。
on keyDown
case (the key) of
"A": go to frame "Apple"
"B", "C":
puppetTransition 99
go to frame "Oranges"
otherwise beep
end case
end keyDown
实例:这一case语句检验指针是否越过精灵1、精灵2或精灵3,如果是的话,它是否运行了相应的lingo.
case the rollOver of
1: puppetSound "Horn"
2: puppetSound "Drum"
3: puppetSound "Bongos"
end case


×××××××××××××××××××××××××××××××××××××
castLib
语法: castLib whichCast
描述:关键字。表明在whichCast中指定的演员表为一个演员。默认的演员是第一个演员。要在演员成员中指定除第一位演员以外的演员,设置演员表库以指定两个可轮流替换的演员。
实例:下面的语句在消息窗口显示“Buttons”在演员库中的序号。
Dot syntax:
put castLib("Buttons").number
Verbose syntax:
put the number of castLib "Buttons"
实例: 下面语句是将第4演员库中的第5个演员分配给sprite 10
sprite(10).member = member(5, 4)

编辑历史:[这消息被mzgjingsi编辑过(编辑时间2001-01-18 19:14:39)]


我是小马

职务:普通成员
等级:3
金币:17.0
发贴:794
#32001/3/6 16:58:01
castLibNum
语法: member(whichCastMember).castLibNum
the castLibNum of member whichCastMember
sprite(whichSprite).castLibNum
the castLibNum of sprite whichSprite
描述:演员成员和精灵属性,检测包含指定演员成员的演员表的编号或者检测与指定精灵相联系的演员表的编号。
如果你只是改变精灵的castlibnum属性,而没有改变精灵的memberNum属性,那Director会在新演员表中使用具有同样编号的演员成员。这对影片非常有用,你可以制作一个模板,升级时只需替换新的演员表。如果你组织演员组内容以便每个演员表成员在电影有对应于它的角色的一个演员组成员编号,Director自动地正确插入新的演员组成员。为了改变精灵的演员而不管演员在那个演员表,只需改变精灵的castlibnum属性。
对一个演员组成员来说,其属性能被测试但不能设置。而对一个精灵来说,其属性既可测试又可设置。
实例:这一语句检测演员“JAZZ”在演员表中的编号。
点语法:(Dot syntax:)
put member("Jazz").castLibNum
详细语法:(Verbose syntax:)
put the castLibNum of member "Jazz"
实例: 这一语句将精灵 5 的演员所在演员表在演员库中的编号改变为演员表“Wednesday Schedule”在演员库中的编号。
点语法:
sprite(5).castLibNum = castLib("Wednesday Schedule").number
详细语法:
set the castLibNum of sprite 5 to the number of castLib "Wednesday Schedule"

××××××××××××××××××××××××××××××××××××××××××××
castMemberList
Syntax member(whichCursorCastMember).castmemberList
the castmemberList of member whichCursorCastMember
描述:光标演员属性;一个光标所使用的演员的列表。WhichCursorCastMember为光标演员的名字(名字在双引号里)或者为光标演员的编号。你也可以从不同演员表中指定演员成员。
在列表的第一演员成员是光标的第一帧,第二演员组成员是第二帧,诸如此类。
如果你指定在光标中使用无效的演员成员,他们将被忽视,余下的演员成员仍被使用。
这个属性既能被测试也能被设置。
实例:下面命令为名为“myCursor”的活动光标设置了四个演员成员。
点语法:
member("myCursor").castmemberList = \
[member 1, member 2, member 1 of castlib 2, member 2 of castlib 2]
详细语法:
set the castmemberList of member "myCursor" = \
[member 1, member 2, member 1 of castlib 2, member 2 of castlib 2]

××××××××××××××××××××××××××××××××××××××××××××
center
语法: member(whichCastMember).center
the center of member whichCastMember
描述:演员属性;与Crop相互影响的演员属性。当Crop属性为假,center属性无效。
当Crop为真,center也为真,则数字视频演员被角色的矩形居中切割。
当Crop为真,center为假,则数字视频演员的右端与底侧被角色的矩形切割。
该属性能被测试并设置。
实例:This statement causes the digital video cast member Interview to be displayed in
the top left corner of the sprite.(这一语句引起数字视频在精灵的左上角落被显示的成员会见)
Dot syntax:
member("Interview").center = FALSE
Verbose syntax:
set the center of member "Interview" to FALSE
See also crop (cast member property), centerRegPoint, regPoint, scale

××××××××××××××××××××××××××××××××××××××××××××
centerRegPoint
Syntax member(whichCastMember).centerRegPoint
the centerRegPoint of member whichCastMember
Description Flash, vector shape, and bitmap cast member property; automatically centers the
registration point of the cast member when you resize the sprite (TRUE, default); or
repositions the registration point at its current point value when you resize the
sprite, set the defaultRect property, or set the regPoint property (FALSE).
This property can be tested and set.
(Flash――矢量图形和位图演员组成员属性;当你缩放精灵时,自动地集中演员组成员的登记点(真实,缺省); 或在它的当前点数值重新定位登记点。当你缩放精灵时,设置 defaultRect 性质,或设置 regPoint 性质(假)。属性能被测试并设置。)
Example This script checks to see if a Flash movie’s centerRegPoint property is set to TRUE. If
it is, the script uses the regPoint property to reposition the sprite’s registration point
to its upper left corner. By checking the centerRegPoint property, the script ensures
that it does not reposition a registration point that had been previously set using
the regPoint property.(这个剧本检查看是否一Flash电影的 centerRegPoint 性质被设置到真实。如果它是,剧本使用 regPoint 性质重新定位精灵的登记点到它的左上角。通过检查 centerRegPoint 性质,剧本保证它不重新定位以前被设置了使用 regPoint 性质的一个登记点。)
Dot syntax:
on beginSprite me
if sprite(the spriteNum of me).member.centerRegPoint = TRUE then
sprite(the spriteNum of me).member.regPoint = point(0,0)
end if
end"
Verbose syntax:
on beginSprite me
if the centerRegPoint of member the memberNum of me = TRUE then
set the regPoint of member the memberNum of me = point(0,0)
end if
end
See also regPoint

××××××××××××××××××××××××××××××××××××××××××××
centerStage
Syntax the centerStage
Description Movie property; determines whether the Stage is centered on the monitor
when the movie is loaded (TRUE, default) or not centered (FALSE). Place the
statement that includes this property in the movie that precedes the movie you
want it to affect.(电影属性决定了:舞台是否在监视器上被集中;电影什么时候被装载(真实,缺省)或集中(假)。放在领先的电影包括这个性质的语句你想要它影响的电影。将包含这一属性的语句放在你想影响的电影之前的电影中。)
This property is useful for checking the Stage location before a movie plays
from a projector.(这一属性对于在影片放映前检查舞台位置是有用的。)
This property can be tested and set.
Note: Be aware that behavior while playing back in a projector differs between Windows
and Macintosh systems. Settings selected during creation of the projector may override
this property.(确知放映机倒放时,Windows和Macintosh系统的行为是不同的。在放映机的创建期间被选择了的设置可以越过这个性质。)
Example This statement sends the movie to a specific frame if the Stage is not centered:(如果舞台没被集中,这条语句送电影到一个特定的帧。)
if the centerStage = FALSE then go to frame "Off Center"
Example This statement changes the centerStage property to the opposite of its
current value:(这条语句改变了centerStage的属性为当前值的相反值。)
set the centerStage to (not the centerStage)
See also fixStageSize


××××××××××××××××××××××××××××××××××××××××××××
changeArea
Syntax member(whichCastMember).changeArea
the changeArea of member whichCastMember
Description Transition cast member property; determines whether a transition applies only to
the changing area on the Stage (TRUE) or to the entire Stage (FALSE). Its effect is
similar to selecting the Changing Area Only option in the Frame Properties
Transition dialog box.(转变演员组成员属性,决定转变是否仅仅适用于舞台上变化的区域(真实)或到全部舞台(假)。它的效果类似于在帧属性中选择变化区域中唯一的选择。)
This property can be tested and set.
Example This statement makes the transition cast member Wave apply only to the
changing area on the Stage.(这条语句使转变演员组成员Wave仅仅适用于舞台上变化的区域。)
Dot syntax:
member("Wave").changeArea = TRUE
Verbose syntax:
set the changeArea of member "Wave" to TRUE


××××××××××××××××××××××××××××××××××××××××××××
channelCount
Syntax member(whichCastMember).channelCount
the channelCount of member whichCastMember
sound(channelNum).channelCount
Description Sound channel and cast member property; for sound channels, determines the
number of channels in the currently playing or paused sound in the given sound
channel. For sound cast members, determines the number of channels in the
specified cast member.(声音通道和演员组成员属性,声音通道决定了当前播放中的通道数量或所给出的声音通道中暂停的声音通道数量,声音演员组成员决定了指定演员组成员中的通道数量。)
This is useful for determining whether a sound is in monaural or in stereo. This
property can be tested but not set.(这对于决定声音是否是单声或立体的大为有用。这一属性可测试亦可设置。)
Example This statement determines the number of channels in the sound cast member, Jazz.
Dot syntax:(这一语句决定了声音演员组成员中通道的数量。)
put member("Jazz").channelCount
Verbose syntax:
put the channelCount of member "Jazz"
Example This statement determines the number of channels in the sound member
currently playing in sound channel 2:(这一语句决定了声音通道2中正在播放的声音演员组成员的通道数量。)
put sound(2).channelCount


××××××××××××××××××××××××××××××××××××××××××××
char...of
Syntax textMemberExpression.char[whichCharacter]
char whichCharacter of fieldOrStringVariable
textMemberExpression.char[firstCharacter..lastCharacter]
char firstCharacter to lastCharacter of fieldOrStringVariable
Description Keyword; identifies a character or a range of characters in a chunk expression. A
chunk expression is any character, word, item, or line in any source of text (such as field cast members and variables) that holds a string.
(关键词;在一个块表达式中辩明字符的一个字符或一列字符。一个块表达式是任何字符,词,条款,或持有一个字符串的文章(例如域演员组成员和变量)的任何来源的行。)
An expression using whichCharacter identifies a specific character.
An expression using firstCharacter and lastCharacter identifies a range
of characters.
(一个使用 whichCharacter 的表达式辩明一个指定的字符。
一个使用firstcharacter和lastcharacter的表达式辨别一列字符。)
The expressions must be integers that specify a character or range of characters in
the chunk. Characters include letters, numbers, punctuation marks, spaces, and
control characters such as Tab and Return.(表达式必须是在块中指定了一个字符或一列字符的整数。
字符包括字母、数字、标点符号、空格、控制字符键,如Tab或Return。)
You can test but not set the char...of keyword. Use the put...into command to modify the characters in a string.(你能测试然而不能设置 char ...关键词。使用put...into命令修改字符串中的字符。)
Example This statement displays the first character of the string $9.00:
put ("$9.00").char[1..1]
-- "$"
Example This statement displays the entire string $9.00:
put ("$9.00").char[1..5]
-- "$9.00"
Example This statement changes the first five characters of the second word in the third line
of a text cast member(这一语句改变了一文本演员成员第三行第二个单词的前五个字符。)
member("quiz").line[3].word[2].char[1..5] = "?????"
See also mouseMember, mouseItem, mouseLine, mouseWord


××××××××××××××××××××××××××××××××××××××××××××
characterSet
Syntax member(whichFontMember).characterSet
the characterSet of member whichFontMember
Description Font cast member property; returns a string containing the characters included for
import when the cast member was created. If all characters in the original font were included,
the result is an empty string.(字体演员成员属性,演员组成员创建时,回到输入的字符串。如果所有定义为常规字体的字符都包括在内,结果为空。)
Example This statement displays the characters included when cast member 11 was created.
The characters included during import were numerals and Roman characters.(这一语句显示了演员组成员
11创建时的包含的字符。输入的字符为数字与罗马符号。)
put member(11).characterSet
-- "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
See also recordFont, bitmapSizes, originalFont


××××××××××××××××××××××××××××××××××××××××××××
charPosToLoc()
Syntax member(whichCastMember).charPosToLoc(nthCharacter)
charPosToLoc(member whichCastMember, nthCharacter)
Description Field function; returns the point in the entire field cast member (not just the part
that appears on the Stage) that is closest to the character specified by nthCharacter.
This is useful for determining the location of individual characters.
values for charPosToLoc are in pixels from the top left corner of the field cast
member. The nthCharacter parameter is 1 for the first character in the field, 2 for
the second character, and so on.(域功能,在最接近由nthCharacter.指定字符的全域演员组成员(不仅仅是舞台中出现的部分)中回到point。)
Example The following statement determines the point where the fiftieth character in the
field cast member Headline appears and assigns the result to the variable location:(下面语句决定了point,在此point中,域演员组成员的第五十个字符标题显现,且赋结果于变量。)
location = charPosToLoc(member "Headline", 50)


××××××××××××××××××××××××××××××××××××××××××××
chars()
Syntax chars(stringExpression, firstCharacter, lastCharacter)
Description Function; identifies a substring of characters in stringExpression. The substring
starts at firstCharacter and ends at lastCharacter. The expressions firstCharacter and
lastCharacter must specify a position in the string.(功能,识别stringExpression.中的substring。此substring开始于firstCharacter,结束于lastCharacter,两者须分别在字符串中指定位置。)
If firstCharacter and lastCharacter are equal, then a single character is returned from
the string. If lastCharacter is greater than the string length, only a substring up to
the length of the string is identified. If lastCharacter is before firstCharacter, the
function returns the value EMPTY.(如firstCharacter和lastCharacter相同,那么从字符串中回到这一单个字符(Character)。如果lastCharacter长于这个字符串的长度,那么只有一个与此字符串长度相当的substring被识别。如果lastCharacter在firstCharacter的前面,那么这一功能回到EMPTY值。)
To see an example of chars() used in a completed movie, see the Text movie in the
Learning\Lingo Examples folder inside the Director application folder.(要看到完成电影中的chars实例,可查看Director application folder内的Learning\Lingo Examples folder中的Text movie。)
Example This statement identifies the sixth character in the word Macromedia:(这一语句识别Macromedia一词中的第六个字符。)
put chars("Macromedia", 6, 6)
-- "m"
Example This statement identifies the sixth through tenth characters of the word
Macromedia:(这一语句确定Macromedia一词的第六个字符到第十个字符。)
put chars("Macromedia", 6, 10)
-- "media"
Example This statement tries to identify the sixth through twentieth characters of the word
Macromedia. Because the word has only 10 characters, the result includes only the
sixth through tenth characters.(这一语句势图确定Macromedia一词的第六个字符到第二十个字符。因该词仅有十个字符,结果只包括第六个到第十个字符。)
put chars ("Macromedia", 6, 20)
-- "media"
See also char...of; length() and offset() (string function); number (characters)


××××××××××××××××××××××××××××××××××××××××××××
charSpacing
Syntax chunkExpression.charSpacing
Description Text cast member property; enables specifying any additional spacing applied to
each letter in the chunkExpression portion of the text cast member.(Text演员组成员属性,能指定任何额外的间距,用于演员组成员内chunkExpression中的每一个字母。)
A value less than 0 indicates less spacing between letters. A value greater than 0
indicates more spacing between letters.(低于0值意味着字母间距较小,而大于0值则表明字母间有更大的间距。)
The default value is 0, which results in default spacing between letters.(默认值为0,这是字母间的默认间距。)
Example The following handler increases the current character spacing of the third through
fifth words within the text cast member myCaption by a value of 2:(通过将值设定为2,以下处理程序增加了text cast member中第三到第五单词的字符间距。)
on myCharSpacer
mySpacevalue = member("myCaption").word[3..5].charSpacing
member("myCaption").word[3..5].charSpacing = (mySpacevalue + 2)
end


××××××××××××××××××××××××××××××××××××××××××××
charToNum()
Syntax (stringExpression).charToNum
charToNum(stringExpression)
Description Function; returns the ASCII code that corresponds to the first character of
stringExpression.(功能;回到与stringExpression中第一个字符相应的ASCII码。)
The charToNum() function is especially useful for testing the ASCII value of
characters created by combining keys, such as the Control key and another
alphanumeric key.(charToNum()功能对测试由组合键(如控制键+其它字母数字键)录入字符的ASCII码十分有用。)
Director treats uppercase and lowercase letters the same if you compare them
using the equal sign (=) operator; for example, the statement put ("M" = "m")
returns the result 1 or TRUE.(Director对大小写的识别是一样的。比如,输入大写M与输入小写的m 都是正确的。)
Avoid problems by using charToNum() to return the ASCII code for a character and
then use the ASCII code to refer to the character.
Example This statement displays the ASCII code for the letter A:(此句显示了字母A的ASCII码。)
put ("A").charToNum
-- 65
Example The following comparison determines whether the letter entered is a capital A,
and then navigates to either a correct sequence or incorrect sequence in the Score:
on CheckKeyHit theKey(以下语句决定了开始字母输入时是否大写,顺序是否得当。)
if (theKey).charToNum = 65 then
go "Correct Answer"
else
go "Wrong Answer"
end if
end
See also numToChar()


××××××××××××××××××××××××××××××××××××××××××××
checkBoxAccess
Syntax the checkBoxAccess
Description Movie property; specifies one of three possible results when the user clicks a check
box or radio button created with button tools in the Tools window:
0 (default)-Lets the user set check boxes and radio buttons on and off.
1-Lets the user set check boxes and radio buttons on but not off.
2-Prevents the user from setting check boxes and radio buttons at all; the
buttons can be set only by scripts.(用户使用工具窗口中的check box或radio button(单选按钮)时,电影属性指定三个可能的结果中的一个。0(默认)-让用户设置checkbox和radio button(单选按钮)的开关。1-阻止用户设置checkbox和radio button(单选按钮),按钮只能在剧本中设置。)
This property can be tested and set.
Example This statement sets the checkBoxAccess property to 1, which lets the user click
check boxes and radio buttons on but not off:(这一语句将checkBoxAccess属性设为1,这时用户只可将checkbox和radio button打开而不能关闭。)
the checkBoxAccess to 1
Example This statement records the current setting of the checkBoxAccess property by
putting the value in the variable oldAccess:(这条语句记录了checkBoxAccess的当前设置,这是通过给oldAccess变量赋值而实现的。)
oldAccess to the checkBoxAccess
See also hilite (cast member property), checkBoxType


××××××××××××××××××××××××××××××××××××××××××××
checkBoxType
Syntax the checkBoxType
Description Movie property; specifies one of three ways to indicate whether a check box
is selected:(电影属性,指定说明check box是否被选的三个方法。)
0 (default)-Creates a standard check box that contains an X when the check
box is selected.(0(默认)-当check box被选时,创建一个标准的包含一个X的check box。)
1-Creates a check box that contains a black rectangle when the check box
is selected.(1-当check box被选时,创建一个包含黑框矩形的check box)
2-Creates a check box that contains a filled black rectangle when the check
box is selected.(2-当check box被选时,创建一个包含填黑矩形的check box。)
This property can be tested and set.
Example This statement sets the checkBoxType property to 1, which creates a black rectangle
in check boxes when the user clicks them:(这一语句设置checkBoxType属性为1,这样,用户点击时,check boxes中创建一个黑框矩形。)
the checkBoxType to 1
See also hilite (cast member property), checkBoxAccess