大家知道,解决一些Director程序启动过慢时,一种办法是制作一个位图文件 projector.bmp(与应用程序的主文件名相同)作为splash,启动projector后,立即在屏幕上显示出此图片,缓解程序过长的启动等待。但projector.exe 如果是以 full screen 模式(其他模式没有问题)创建的话,就会出现运行后程序窗口跑后台去的尴尬局面,在一些程序必须使用full screen模式的情况下,可以通过下面方法解决这个问题。
把 projector.exe 做成不会出错的 in a window 模式,然后执行下面的代码改变窗口的 rect 并使窗口以 full screen方式重绘。
把这段代码放在程序中影片脚本里。
on preparemovie
stageWidth = the stageRight - the stageLeft
stageHeight = the stageBottom - the stageTop
deskRect=the desktoprectlist[1]
deskWidth= deskRect[3]-deskRect[1]
deskHeight= deskRect[4]-deskRect[2]
a=(deskWidth-stageWidth)/2
b=(deskHeight-stageHeight)/2
c=(deskWidth+stageWidth)/2
d=(deskHeight+stageHeight)/2
(the stage).drawrect=rect(a,b,c,d)
(the stage).rect=deskRect
