翻译:乐天的学徒
01. 我能否在我的Director文件中制造一个屏幕保护程序?
[A] 这是一种方法,但它也许需要一些调整。例如,它实际上并不支持在文件的屏保中使用动画。不管怎样,随着你对程序创造性地增加,你
至少能够使这个屏保在屏幕上随机出现所选择的文字。你也可以使用一个或几个精灵在木偶化制成动画。
--电影脚本的开头
GLOBAL gnLastFrame, glLastMouseLoc
--把以下语句加入你的Startmovie()事件处理过程中
set the timeoutLength to 60 * 60 * 5
--这行意思是:一秒分为60个滴答,60个滴答×60=1分钟,1分钟×5=5分钟。(也就是启动屏保时间为5分钟)
when timeOut then ScreenSaver()
--把以下的语句加入电影脚本中
on ScreenSaver
put the frame into gnLastFrame
put the mouseLoc into glLastMouseLoc
go "loopFrame"
END ScreenSaver
--标记“loopFrame”处放置的是你想要作为屏保的动画或随机出现的文字
--请注意,将以下语句放置在标记"loopFrame" 处的帧脚本中
on exitFrame
CheckUserEvent()
end
--把以下的语句加入电影脚本中
on CheckUserEvent
when keyDown then ExitSaver()
if the mouseLoc <> glLastMouseLoc then ExitSaver()
go the frame
END CheckUserEvent
--把以下的语句加入电影脚本中
on ExitSaver
go gnLastFrame
when keyDown then nothing
abort
END ExitSaver
02. 当显示分辨率比我的Director文件所制定的舞台大时,我该怎样用指定的背景颜色把显示器空白部分填满?
[A] 有两种解决的方法。一种是在创建你的放映机时,选中option中FULL SCREEN。这样做的优点是很容易就能做到,但是,它最明显的缺点就是不一定是在你的客户的屏幕中间。此外,可以看来是你的发展文件里的“屏幕”的事情能在如果他们是对权利和底部的“屏幕”出现于编辑的放开上好好地结束了。
另外一种方法是使用Movie In A Window(MIAW)从窗口中调用外部文件。这需要在一些地方编程序而且也更难;但是结果将更令人满意。
这里是一种一般的处理方法。带新局长的开始做成文件,新建一个新的Director文件,并且将它的舞台颜色设置为你所喜欢的背景颜色。
接着,在分镜表的帧1中,定义下列脚本:
on exitFrame
pause
end
之后,把下列语句加入电影脚本。
GLOBAL goFileWindow, gsWindowName, gaFileWindowRect, gsWindowPath, gsSizeOfWindow
on StartMovie
SetUpWindowSpecs()
LaunchMIAW()
END StartMovie
on StopMovie
PurgeMIAW()
unload
END StopMovie
on SetUpWindowSpecs
-- inits dimensions and origins for MIAW object over splash screen
-- plug in your own names below
-- note you do not have to specify ".dxr" or ".dir" for the path to the external file
-- this can really be any name you want; it』s an internal reference
set gsWindowName to "intro"
-- this is the actual MIAW file you want opened by the stub
set gsWindowPath to ( the pathName & "intro" )
put ( the stageRight / 2 ) into nHorizontalCenterOfMonitor
put ( the stageBottom / 2 ) into nVerticalCenterOfMonitor
-- set dims for location of window relative to screen size
