【正文】
mouseword語法:the mouseWord如果當前光標在文字域上,則返回當前光標下的單詞,如果當前光標不在文字域上,則返回1。Cursor語法:cursor [castNumber, maskCastNumber]cursor whichCursor cursor (member whichCursorCastMember)設(shè)定鼠標光標的形狀,如果在cursor后直接加上數(shù)字,則各個數(shù)字的意義如下所示:0 不設(shè)定光標 1 箭頭式的光標 1 I 字符號的光標 2 十字式的光標 3 十字條狀式的光標 4 漏斗式的光標 200 光標消失 280 手指光標281 吸管光標284 雙向箭頭(縱向,帶兩根橫線)光標285 雙向箭頭(橫向,帶兩根豎線)光標286 雙十字光標290 拳頭光標291 拳頭光標,上面有一個圓圈292 拳頭光標,上面有一個加號293 黑色箭頭光標294 旋轉(zhuǎn)光標295 紅色平行四邊形光標296 黑色平行四邊形光標297 雙向箭頭(縱向)光標298 雙向箭頭(45度角)光標299 雙向箭頭(135度角)光標300 雁形光標301 噴槍光標302 放大鏡光標303 縮小鏡光標304 放大到最大時的放大鏡光標如果在Windows環(huán)境下,想使用其它的鼠標光標形狀,可以設(shè)計16*16大小的圖片,將它導(dǎo)入劇組中,將它在劇組中的編號放置在中括弧內(nèi):例如:cursor[1]這個時候的光標是透明的,如果想使用不透明的光標,將原來的演員復(fù)制成另外一個,將所有的空白填滿,這個Cast Member是在第二個位置上,則指令為cursor[1,2],記住要將這二個Cast Member都轉(zhuǎn)換為1bit,16*16的大小,這樣不會出錯。Puppet spritenum,true OR false需要Puppet說明之后,才能執(zhí)行的指令。max語法:()max(list)max(value1, value2, value3, ...)返回陣列中的最大值。Visible of sprite語法:sprite(whichSprite).visiblethe visible of sprite whichSprite設(shè)定精靈通道“whichSprite”是否可見,為0則隱藏,為1則顯示。Stoptime of sprite語法:sprite(whichSprite).stopTimethe stopTime of sprite whichSprite設(shè)置數(shù)字視頻精靈的停止播放時間。Selection語法:the selection返回包含域中高亮部分的字符串,即域中被選中的文本。Rect語法:rect(left, top, right, bottom)rect(point1, point2)定義一個矩形。pausestate語法:the pauseState判斷當前影片是否處于暫停狀態(tài)。“horizontalChange”:水平偏移量;“verticalChange”:垂直偏移量。lastframe語法:the lastFrame返回影片最后一幀的幀數(shù)。Freebytes語法:the freeBytes返回剩余的內(nèi)存空間,單位為字節(jié)。Findempty語法:findEmpty(member whichCastMember)查詢下一個位置為空白的演員編號。dontPassEvent語法:dontPassEvent在Handler結(jié)束后,可能會將執(zhí)行的動作交給下一個可執(zhí)行的Handler,若在Handler結(jié)束前再加上dontPassEvent指令,它就會將執(zhí)行的動作停止,而不會交給下一個可執(zhí)行的Handler。Cast scripttext語法:member(whichCastMember).rectthe rect of member whichCastMember定義劇本位置。Back color語法:member(whichCastMember).backColor = colorNumber set the backColor of member whichCastMember to colorNumber sprite(whichSprite).backColorthe backColor of sprite whichSprite設(shè)定sprite或member的背景顏色,在設(shè)定sprite的背景顏色前必須將這個sprite設(shè)定為 Puppet,這個指令主要是用在使用工具窗口所繪制的向量圖形上,對于其它圖形也是適用的,但必須注意使用之后的變化,在使用這個指令之后,必須使用 updateStage 指令更新舞臺上的所有圖形,這樣才會得到新的畫面。常用的Lingo語句一、常用的Lingo命令盡管在Lingo中有700多條命令,但是在編寫Lingo劇本時,經(jīng)常用到的Lingo命令并不是很多,下面簡單介紹一下常用的一些Lingo命令。Beep語法:beep {numberOfTimes}使用電腦內(nèi)部的喇叭嘀一聲,后面所加上的數(shù)字表示次數(shù)Beepon語法:the beepOn當畫面上某些特定的sprite啟動后,表示將它指定為 puppetSprite,若使用了畫面上的圖形,而這些圖形并不是啟動的sprite時,喇叭響一聲,但是要將thebeepOn設(shè)定為真。Cast width語法:member(whichCastMember).widththe width of member whichCastMember演員的寬度。Drawrect of window語法:window the drawRect of window windowName查詢或設(shè)定窗口的大小。Findpos語法:(property)findPos(list, property)從list中找出property的位置。GetNthFilenameinfolder語法:getNthFileNameInFolder(folderPath, fileNumber)查找folderPath下名為fileNumber的文件。left of sprite語法:sprite(whichSprite).leftthe left of sprite whichSprite返回精靈在舞臺上最左邊的像素點的水平坐標。例如:on diagonalMovenewRect=sprite(1).(5, 5)sprite(1).rect=newRectendon enterframe語法:on enterFramestatement(s)end當影片播放到當前幀或精靈執(zhí)行“statement(s)”中的劇本。picture of cast語法:member().picturethe picture of member whichCastMember用圖片替換“whichCastMember”演員中的圖片或文本。Rect of cast語法:member(whichCastMember).rectthe rect of member whichCastMember判斷、設(shè)置演員的矩形區(qū)域坐標。Selend語法:the selEnd返回域中被選中部分的結(jié)束位置。Tell語法:tell whichWindow to statement(s)tell whichWindowstatement(s)end向另外窗口發(fā)送消息。Visible of window語法:window the visible of window whichWindow設(shè)定窗口“whichWindow”是否可見,為0則隱藏,為1則顯示。maxinteger語法:the maxInteger返回系統(tǒng)支持的最大數(shù)。backcolor 背景顏色 blend 融合程度castnum 演員編號 constraint 移動范圍cursor 光標 editabletext 可編輯文本forecolor 前景顏色 height 圖形高度ink 顏料效果 linesize 線條粗細loch 水平 locv 垂直movablesprite 設(shè)定移動 pattern 向量圖形樣式scriptnum 角色編號 spritebox 角色矩形邊界stretch 擠壓 trails 軌跡top 上邊界的位置 visible 是否顯示width 圖形寬度例如:改變角色的演員 Puppetsprite 1,true Set the castnum of sprite 1 to the number of cast “andy”(castnumber) updatestage六、鍵盤控制BACKSPACE語法:BACKSPACE本指令代表鍵盤上的BACKSPACE鍵。Cursor of sprite語法:sprite(whichSprite).cursor = [castNumber, maskCastNumber]set the cursor of sprite whichSprite to [castNumber, maskCastNumber]sprite(whichSprite).cursor = whichCursorset the cursor of sprite whichSprite to whichCursor當光標移動到指定的精靈上時,才會出現(xiàn)新的光標,其它方法都與 cursor指令相同。rollover語法:rollOver(whichSprite)the rollOver判斷當前鼠標光標是否在指定的精靈上。mousev語法:the mousev返回當前鼠標光標的垂直坐標。Clickon語法:the clickOnthe clickOn的值為使用者所點擊的精靈通道數(shù)值,我們可以利用這個數(shù)值來判斷使用者所點擊的精靈。五、Puppet控制某一幀上的精靈。例如:put integer() 4put integer()3interP語法:(numericExpression).integerPintegerP(expression)判斷一個數(shù)值表達式是否為整數(shù)。Version語法:version此變量保存的是Director版本號的字符串。Stilldown語法:the Stilldown判斷用戶是否正按下鼠標鍵。Scripttext of cast語法:member(whichCastMember).scriptTextthe scriptText of member whichCastMember當前幀的幀劇本的內(nèi)容。Ramneeded語法:ramNeeded (firstFrame, lastFrame)判斷從firstFrame到lastFrame所需要的內(nèi)存空間,單位為字節(jié)。值為FALSE則立即播放。例如:put offset(media,Macromedia)6offset rect語法:(horizontalChange, verticalChange)offset (rectangle, horizontalChange, verticalChange)設(shè)置精靈覆蓋層的偏移量。labellist語法:the labelList返回一個marker名字符串,一個marker名為一行。Freeblock語法:the freeBlock返回剩余的內(nèi)存空間,單位為字節(jié)。Filename of window語法:window the fileName of window whichWindow窗口中的影片名。Doneplay done語法:結(jié)束play指令的動作,回到調(diào)用它的地方。0 never1 last2 next3 normalCast rect語法:member(whichCastMember).rectthe rect of member whichCastMember演員的在舞臺上的坐標。Ancestor語法:property {optionalProperties} ancestorancestor表示子對象可以引用父程序之外的handler,也就是說,可以將部分handler放置在另一個script中,而這個script中的handler可以被其它子對象引用。1.go這是一個在Director中非常常用的命令,在前面的制作中我們曾經(jīng)不只一次用到它,它的用法也比較多,主要包括下面一些情況:go to Frame [FrameNumber]:跳轉(zhuǎn)到幀。Birth語法:birth (script 父程式的名稱 , 值1 , 值2 , ...)產(chǎn)生子劇本的指令。CastLibnum語法:member(whichCastMember).castLibNumthe castLibNum of member whichCastMembersprite(whichSprite).cast