以前我写的一个程序 仔细看一下
--author:ccloveaa
--nickname:小鸡
--date:2005.10.28
--mail:ccloveaa@sina.com
--http://www.shockwave3d.cn
--功能:修改屏幕分辨率色深并且寻找出最大刷新率
--changeDisplayMode("800","600","32")
--::::::::::::::::::::::: Behavior Description :::::::::::::::::::::::
global gOldDisplayMode
on startmovie me
gOldDisplayMode=aGetDisplayMode()
if gOldDisplayMode[1]=800 and gOldDisplayMode[2]=600 then
--now is 800*600
else
changeDisplayMode("800","600","32")
end if
end
on stopmovie me
aChangeDisplayModePlus(gOldDisplayMode[1], gOldDisplayMode[2] , gOldDisplayMode[3], gOldDisplayMode[4],0)
end
on changeDisplayMode arg1,arg2,arg3
--arg1,width.arg2,height,arg3,bit
allDisplayMode=aGetDispalyModes()
tItemDelimiter=_player.itemDelimiter
_player.itemDelimiter=","
targetDisplayModeList=[]
repeat with i =1 to allDisplayMode.count
--get target displaymode
if allDisplayMode[i].item[1]=arg1 and allDisplayMode[i].item[2]=arg2 and allDisplayMode[i].item[3]=arg3 then
targetDisplayModeList.add(allDisplayMode[i])
end if
end repeat
--
if targetDisplayModeList=[] then
alert("can't set this display mode!")
else
count=targetDisplayModeList.count
freq=integer(targetDisplayModeList[count].item[4])
--change displaymode
arg1=integer(arg1)
arg2=integer(arg2)
arg3=integer(arg3)
aChangeDisplayModePlus(arg1,arg2 ,arg3,freq,0)
end if
_player.itemDelimiter=tItemDelimiter
end
www.ccloveaa.com/blog/article.asp?id=19