Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Check for activeX component
createSpecList
Macromedia Director 8 Shockwave Studio- Illustrated Introductory
Set Quality of a Flash Cast member
installer/unstaller
Amplitude Xtra Review
Gang Buster
Tabuleiro Nebulae MultiUserServer
Text Drop Shadows (and a moving light)
Any Saver
 

 

 

Article Making Stage fill screen or not

Added on 4/25/2001

 

Compatibilities:
D7 D8 D8_5 Mac PC

This item has not yet been rated

Author: mstecker (website)

I'm just expanding on Chuck's article about having the stage fill the screen.

Using the stage.rect and the stage.drawRect you can scale most everything and still get "normal" playback. here's how I did it...

global oldSettings , gFullScreen

on prepareMovie
--change this setting to 1 or 2
--1 being normal, 2 being full screen
set gFullScreen = 1
checkRes
end

on CheckRes me
if gFullScreen = 1 then
changeResFull
else if gFullScreen = 2 then
changeResNorm
end if
end

on changeResFull me
if float(the DesktopRectList[1][3]) / the deskTopRectList[1][4] <> (640.0/480) then
oldSettings = [(the stage).rect, (the stage).drawRect]
(the stage).rect = the deskTopRectList[1]
(the stage).drawRect = the deskTopRectList[1]
end if
end

on changeResNorm me
if float(the DesktopRectList[1][3]) / the deskTopRectList[1][4] <> (640.0/480) then
oldSettings = [(the stage).rect, (the stage).drawRect]
w = (the deskTopRectList)[1].width
h = (the deskTopRectList)[1].height
dw = (w - 640) / 2
dh = (h - 480) / 2
(the stage).rect = (rect(dw, dh, 640 + dw, 480 + dh))
(the stage).drawRect = (rect(0, 0, 640, 480)
end if
end

on returnScreen me
if listP(oldSettings) then
(the stage).rect = oldSettings[1]
(the stage).drawRect = oldSettings[2]
end if
end

on getBehaviorDescription me
describe = "This script allows you to enlarge the stage to full screen and stretches the cast members with it. Note that Text and Field members do not scale and this could slow performance."
return describe
end


There are a couple of drawbacks to this method.
1 - Text and field members do not currently scale
2 - Bitmaps that are scaled will slow performance on slower machines
3 - On dual monitor systems that see both monitors as a single desktop (Windows NT only) this script is disabled to prevent stretching of image to twice the original width.

Play with it and see if it works for you. Obviously you get better performance scaling an 800 X 600 project down to 640 X 480 than going the other way.

Oh - you can also call 'returnScreen' to return the screen back to normal viewing size.

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail