home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1&1 Multimedia Trend 1996 10 B
/
MM_TREND.ISO
/
prog
/
t-online
/
shared.dir
/
00307_Script_307
< prev
next >
Wrap
Text File
|
1996-08-16
|
2KB
|
100 lines
--mac
--Backdrop XObject
--Paints a backdrop behind the director stage
--that will prevent users from seeing
--or clicking on anything in the background.
--Useful for small movies on large monitors
--Products distributed for free or on a not-for-profit
--basis can use Backdrop free of charge.
--Any other use requires a licensing fee.
--See the accompanying files
--for licensing information.
-- AppleLink: INK.LINK
-- CompuServe: 70401,3202
-- Internet: ink.link@applelink.apple.com
--⌐1993-94 Peter Vanags, Electronic Ink
--Here's the method list from mDescribe:
-- I mNew
-- X mDispose
-- XI mSetColor, color
-- X mShow
-- X mHide
-- XI mHideInBack, trueOrFalse
on InitTheMac
global bg --global variable for our Backdrop instance
exit
--only instantiate the backdrop once!
--creating multiple instances of
--the backdrop XObject is dangerous!
if the machineType < 255 then
if objectp(bg)=0 then
--I like to keep xobjects in separate 'XOBJ' files
--in the same folder as the movie
--and open the xobject files only when I
--need to instantiate the XObject
openxlib "backdrop xobj"
put backdrop (mNew) into bg
--Then I close the file as soon as I'm done
--to avoid having lots of open files connected
--to a movie.
closexlib "backdrop xobj"
end if
if objectp(bg) then
--set whether the backdrop hides
--when we switch to another application
--(this should be set to match the movie preference
--"animate in background")
bg (mHideInBack,false)
--set the color of the backdrop
bg (mSetColor,256)
--show the backdrop while the movie plays
bg (mShow)
end if
end if
end InitTheMac
on ResetTheMac
global bg,
exit
--hide the backdrop when the movie's not playing
--(you don't have to do this if you like to keep the backdrop
--there while you work on a movie)
if the machineType < 255 then
if objectp(bg) then bg(mHide)
end if
end ResetTheMac