home *** CD-ROM | disk | FTP | other *** search
/ 1&1 Multimedia Trend 1996 10 B / MM_TREND.ISO / prog / isdn / shared.dir / 00307_Script_307 < prev    next >
Text File  |  1996-08-18  |  2KB  |  100 lines

  1. --mac
  2.  
  3. --Backdrop XObject
  4.  
  5. --Paints a backdrop behind the director stage
  6. --that will prevent users from seeing
  7. --or clicking on anything in the background.
  8. --Useful for small movies on large monitors
  9.  
  10. --Products distributed for free or on a not-for-profit
  11. --basis can use Backdrop free of charge.
  12. --Any other use requires a licensing fee.
  13.  
  14. --See the accompanying files
  15. --for licensing information.
  16.  
  17. --        AppleLink:  INK.LINK
  18. --       CompuServe:  70401,3202
  19. --         Internet:  ink.link@applelink.apple.com
  20.  
  21. --⌐1993-94 Peter Vanags, Electronic Ink
  22.  
  23.  
  24. --Here's the method list from mDescribe:
  25. --  I      mNew
  26. --  X      mDispose
  27. --  XI     mSetColor, color
  28. --  X      mShow
  29. --  X      mHide
  30. --  XI     mHideInBack, trueOrFalse
  31.  
  32.  
  33. on InitTheMac
  34.   global bg  --global variable for our Backdrop instance
  35.   exit
  36.   
  37.   --only instantiate the backdrop once!
  38.   --creating multiple instances of
  39.   --the backdrop XObject is dangerous!
  40.   if the machineType < 255 then
  41.     
  42.     
  43.     if objectp(bg)=0 then
  44.       
  45.       --I like to keep xobjects in separate 'XOBJ' files
  46.       --in the same folder as the movie
  47.       --and open the xobject files only when I
  48.       --need to instantiate the XObject
  49.       
  50.       openxlib "backdrop xobj"
  51.       put backdrop (mNew) into bg
  52.       
  53.       --Then I close the file as soon as I'm done
  54.       --to avoid having lots of open files connected
  55.       --to a movie.
  56.       
  57.       closexlib "backdrop xobj"
  58.       
  59.     end if
  60.     
  61.     if objectp(bg) then
  62.       
  63.       --set whether the backdrop hides
  64.       --when we switch to another application
  65.       --(this should be set to match the movie preference
  66.       --"animate in background")
  67.       
  68.       bg (mHideInBack,false)
  69.       
  70.       --set the color of the backdrop
  71.       bg (mSetColor,256)
  72.       
  73.       --show the backdrop while the movie plays
  74.       bg (mShow)
  75.       
  76.     end if
  77.     
  78.   end if
  79.   
  80.   
  81. end InitTheMac
  82.  
  83.  
  84.  
  85.  
  86. on ResetTheMac
  87.   global bg,
  88.   exit
  89.   --hide the backdrop when the movie's not playing
  90.   --(you don't have to do this if you like to keep the backdrop
  91.   --there while you work on a movie)
  92.   
  93.   if the machineType < 255 then
  94.     
  95.     if objectp(bg) then bg(mHide)
  96.   end if
  97.   
  98.   
  99. end ResetTheMac
  100.