This behavior removes the 1 pixel black border from projectors.
-- This behaviour does the following:
-- If it finds the stage to be smaller or equal than the current screenresolution
-- it resizes the stage to that resolution, but sets the drawrect to the source.
-- It thereby removes the dreaded 1 pixel black border. If the screenresolution is
-- smaller than the stage, this behaviour only rescales the stage to fit the displayresolution.
-- This behaviour is set to only work in projector mode and is not intended to work
-- as a shockwave movie.
if me.isProjector() then
on isBiggerThanScreen(me, aRect)
-- Check if the stage is bigger than the screen resolution
return (aRect.width > (the desktopRectList).width)
-- check if running in projector mode
return not (the runMode contains "author")
lRect = (the desktopRectList)
if me.isBiggerThanScreen((the stage).sourceRect) then
-- set the new drawrect to the size of the screen resolution
lNewDrawRect = lRect
-- set the new drawRect to the sourcerect of the stage
lNewDrawRect = (the stage).sourceRect
-- First resize the stage
(the stage).rect = lRect
-- Then resize the drawrect
(the stage).drawRect = lNewDrawRect