AVI播放器制作操作步驟如下:
(1) 進入Director 8.5。執行Modify→Movie→Properties命令,在彈出的舞臺屬性檢查器對話框中將電影舞臺的大小設置為500×400,將背景顏色設置為白色,如圖7-145所示。
(2) 按Ctrl+R組合鍵,導入12張圖片,在Cast窗口中顯示,如圖7-146所示。
(3) 按Ctrl+R組合鍵,在Import窗口導入AVI電影,單擊OK按鈕,在彈出的Select Format對話框中選擇AVI格式,如圖7-147所示。
(4) 將Cast演員“動畫”拖動到舞臺上,調整其大小與位置,生成精靈1,效果如圖7-148所示。
圖7-151 第2幀的Lingo腳本
(8) 選中舞臺上的精靈2,單擊右鍵,在快捷菜單中選擇Script命令,打開Script窗口為其添加以下的Lingo語句,如圖7-152所示。
on mouseUp me
set the movietime of sprite 1 to 0
set the movierate of sprite 1 to 0
set the castnum of sprite 2 to member("lad")
set the castnum of sprite 3 to member("ld")
set the castnum of sprite 4 to member("playu")
set the castnum of sprite 5 to member("stopd")
set the castnum of sprite 6 to member("ru")
set the castnum of sprite 7 to member("rau")
updatestage
end
(9) 選中舞臺上的精靈3,打開Script窗口為其添加以下的Lingo語句,如圖7-153所示。
on mouseUp me
set the castnum of sprite 2 to member("lau")
set the castnum of sprite 3 to member("ld")
set the castnum of sprite 4 to member("playu")
set the castnum of sprite 5 to member("stopu")
set the castnum of sprite 6 to member("ru")
set the castnum of sprite 7 to member("rau")
updatestage
set the movierate of sprite 1 to_2
end
(10) 選中舞臺上的精靈4,打開Script窗口為其添加以下的Lingo語句,如圖7-154所示。
on mouseUp me
set the movierate of sprite 1 to 1
set the castnum of sprite 2 to member("lau")
set the castnum of sprite 3 to member("lu")
set the castnum of sprite 5 to member("stopu")
set the castnum of sprite 6 to member("ru")
set the castnum of sprite 7 to member("rau")
end
(11) 選中舞臺上的精靈5,打開Script窗口為其添加以下的Lingo語句,如圖7-155所示。
on mouseUp me
if (the castnum of sprite 7 = 8) then
set the movietime of sprite 1 to the duration of the member of sprite 1
set the castnum of sprite 2 to member("lau")
set the castnum of sprite 3 to member("lu")
set the castnum of sprite 4 to member("playd")
set the castnum of sprite 5 to member("stopu")
set the castnum of sprite 6 to member("rd")
set the castnum of sprite 7 to member("rad")
updatestage
end if
end
(12) 選中舞臺上的精靈6,打開Script窗口為其添加以下的Lingo語句,如圖7-156所示。
on mouseUp me
set the movierate of sprite 1 to 2
set the castnum of sprite 2 to member("lau")
set the castnum of sprite 3 to member("lu")
set the castnum of sprite 4 to member("playu")
set the castnum of sprite 5 to member("stopu")
set the castnum of sprite 6 to member("rd")
set the castnum of sprite 7 to member("rau")
updatestage
end
(13) 選中舞臺上的精靈7,打開Script窗口為其添加以下的Lingo語句,如圖7-157所示。
on mouseUp me
if (the castnum of sprite 5 = 12) then
set the movierate of sprite 1 to 0
set the castnum of sprite 5 = member("stopd")
updatestage
end if
end
(14) 至此,AVI播放器動畫的制作完成了,播放電影,效果如圖7-158所示。