#module
#deffunc mciload str, int
mref file, 32 : mref no, 1
cntno = no
mci "close _" + cntno
strmid i, file, , 2 : int i
if i {
file = "cdaudio!?"
poke file, 8, i + 64
}
mci "open \"" + file + "\" alias _" + cntno
return
#deffunc mciplay str, str, int
mref start, 32 : mref finish, 33 : mref re, 2
if start ! "" : s = " from " + start : else : s = ""
if finish ! "" : s += " to " + finish
if re : s += " repeat"
mci "play _" + cntno + s
return
#deffunc mciend onexit
mci "stop all"
mci "close all"
return
#deffunc mciwinset int
mref id, 0
mref bmscr, 96 + id
mci "window _" + cntno + " handle " + bmscr.13
return
#deffunc mcisetvideo int
mref flg, 0
if flg : s = "on" : else : s = "off"
mci "set _" + cntno + " video " + s
redraw
return
#global
objsize 80, 20
pos winx - 80
button "読込", *load
button "映像OFF", *video
button "映像ON", *video
stop
*load
dialog "avi", 16, "再生する動画(サウンドのみ)"
if stat {
mciload refstr
mciwinset
mciplay "", ""
}
stop
*video
mcisetvideo stat = 2 // [OFF]なら0、[ON]なら1
stop
|