当前位置:文档之家› director软件lingo语言实用收集

director软件lingo语言实用收集

1、加法计算器
on mouseUp me
alert"角色二的内容是:"&member(2).text
end
on mouseUp me阿
member(7).text=string(value(member(5).text)+value(member(6).text))
end

on mouseUp me
a=0
repeat with i=1 to 100
a=a+i
end repeat
alert"等差数列的和是:"&a
end
2、随着鼠标移动
on exitFrame me
go to the frame
sprite(1).loch=the mouseh
sprite(1).locv=the mousev
end
on mouseUp me
sprite(1).locv=sprite(1).locv+2
end

on exitFrame me
go to the frame
sprite(1).loch=the mouseh
sprite(1).locv=the mousev
end
sprite(1).rotation=sprite(1).rotation+12
3、控制语句
on startMovie
set the keydownScript to "chessKey"
end startMovie

on stopMovie
end stopMovie

on chesskey
case (the keyCode) of
18:play movie"one"
19:play movie"two"
20:play movie"three"
21:play movie"four"
23:play movie"five"
1:go to marker(0)
126:go to marker(0)
0:go to marker(-1)
123:go to marker(-1)
124:go to marker(+1)
2:go to marker(+1)
end case
end chesskey


director中各键值列表
1—18 2—19 3—20 4—21 5—23 6—22 7-- 26
8—28 9—25 0—29 a—0 b—11 c—8 d-- 2
e—14 f—3 g—5 h—4 i—34 j—38 k-- 40
l—37 m—46 n—45 o—31 p—35 q-- 12
r—15 s—1 t—17 u—32 v—9 w—13 x—7
y—16 z—6 +-- 78 - -- 70 *-- 66 /-- 77
enter—65 top—126 down—125 left—123 right-- 124
delet—117 home—115 end—119 pageup—116
pagedown—121 f11-- 103





4. 如何制作一个放映机(projector)可以在不同分辨率下播放?

[A] 加入下列语句:

on prepareMovie
(the stage).rect = (the desktopRectList)[1]
(the stage).drawRect = (the desktopRectList)[1]
end
设置movie,使之自动缩放以适应屏幕大小

A:使用如下script:
on preparemovie
(the stage).rect=(the desktoprectlist)[1]
(the stage).drawrect=(the desktoprectlist)[1]
end
注意,这个语句是通过放大或缩小舞台来达到效果的,所以会有变形。

5、 如何制作光盘的自动运行程序?

在pc上,可以制作一个包含以下内容的txt文件,文件名为autorun.inf

[autorun]
open=projectorname.exe
icon=icon.ico

更改projectorname使之与你的exe名一样,并可加上路径如open=stuffprojector.exe,图标可以是任何的图标文件。
6、怎样防止视频在播放以后在舞台上留下残影(图象滞留)

[A] 要去处已播放完毕但仍留在舞台上的视频的图象,可以在电影放完后的第一幀用一个脚本强制使它更新整个屏幕:

on exitFrame
the stageColor = the stageColor
end
7、director中事件发生的顺序

prepareMovie
beginsprite for frame 1
stepFrame for frame 1
prepareframe for frame 1
startMovie
enterFrame for frmae 1
exitfrmae for frame 1
8、Director生成文件减肥技巧

beginsprite for next frame


制作一个stub.dir,用Lingo去执行play其他电影的命令,事实上stub.dir只有一个命令行。
on startMovie
go to movie "movieName"
end

***********************************************************
on keydown()
case (keypressed()) of
"A":go to "one"
"B":go to marker("two")
"C":go to "three"
21:play movie"four"
23:play movie"five"
1:go to marker(0)
126:go to marker(0)
0:go to marker(-1)
123:go to marker(-1)
124:go to marker(+1)
2:go to marker(+1)
end case
end keydown
**********************************************************
按键跳到指定位置。

相关主题
文本预览
相关文档 最新文档