This content has been marked as final. Show 3 replies
Yes - don't eject a disc that's currently in use!
Seriously, it sounds like your projector is trying to access data on the
disc - which is no longer available. What would you expect to happen?
Nice simple solution, thanks, maybe I should supply a roll of gaffer tape with the DVD so that the user can tape the DVD drive shut.
Yes the projector is accesing data from the DVD. I would expect this to cause an error.
What I had hoped for was a way of handling the event to close the software without entering an infite loop of requests for the user to replace the DVD.
> What I had hoped for was a way of handling the event to close the software
> without entering an infite loop of requests for the user to replace the DVD.
Depending on whether it's a Director-generated error or an OS-generated
error (I would expect the latter, unfortunately, in which case there's
nothing I'm aware of that you can do about it) you might try using the
alertHook to suppress any errors (not recommended unless you're sure
you've debugged thoroughly) (the following from James Newton, IIRC):
-- parent script "error.suppress.class"
on alertHook(me, anErrorType, aMessage, aGenerator) -------------------
-- INPUT: <anErrorType> will be one of four strings:
-- "Script runtime error"
-- "Script syntax error"
-- "File error"
-- "File read error"
-- <aMessage> will be a string such as "Handler not defined"
-- <aGenerator> may be #alert or #script (D8.0 and later)
-- OUTPUT: This handler should return an integer:
-- 0, any non-integer value:
-- authortime - Cancel/OK dialog (both buttons have the
-- same effect), halts movie and opens Script
-- runtime - Cancel/OK dialog (both buttons have the
-- same effect), ignores errors and continues
-- if possible
-- Any non-zero integer:
-- authortime - no dialog, halts movie and opens Script
-- runtime - no dialog, ignores error and continues if
-- * Errors in do() commands or in the primary event handlers, such
-- as the mouseDownScript will not result in the Script window
-- opening if the error occurred in a string rather than in a script.
-- * alert() commands are considered to be error messages and
-- are intercepted by the alertHook script. If the return value
-- of the alertHook handler is not 0, no alerts will appear.
-- Authortime use of alert() commands will not halt the movie even
-- if the command is intercepted by the alertHook script.
-- * alert() commands used inside the alertHook() handler do not
-- cause recursion.
-- * The MUI xtra's alert() function does not get intercepted, but
-- it cannot be used in Shockwave.
-- * In Shockwave or a Projector, the alertHook() will give more
-- information than the standard Director Player Error, but
-- script member references will not be given.
And you invoke it or set it up to intercept errors by the following:
-- #movie script:
_player.alertHook = script("error.suppress.class")