Hi Michael,

2 ideas:

1) if you only want to block lingo generated alerts, not error alerts,
just put a
on alert
  nothing
end
in some movie script of your miaw, which overwrites the alert command.

2) instead of changing the alerthook you could also have different
return values in your alerthook dependent on the presence of your miaw:

e.g.
on alertHook (me, msg, text, type)
    if windowPresent("myMiaw") then
        return 0
    else
        return 1
    end if
end


Regards,
Valentin


Michael von Aichberger wrote:
> Hello list,
>
> I have a question concerning the alerthook.
>
> I have a main movie, which opens a miaw.
>
> In the main movie I want to suppress alert boxes popping up when
> running as a projector, so I put this in the startMovie handler:
>
>  if the runmode <> "Author" then
>     the alertHook = script("oErrorHandling")
>   else
>     the alertHook = 0
>   end if
>
> Works fine. The oErrorHandling script outputs the alerts in a status
> field.
>
> So far so good.
>
> However, in the miaw, I don't want to suppress the alert messages. So
> I put the alertHook = 0 in the startMovie handler of the miaw.
>
> This works too. When the miaw gets closed, I want to suppress the
> alerts again. Therefore I put this in the on stopMovie handler
>
>  if the runmode <> "Author" then
>     the alertHook = script("oErrorHandling")
>   else
>     the alertHook = 0
>   end if
>
> But this doesn't work anymore. I still get error boxes.
>
> I tried to put the code in the on deactivateWindow handler, but with
> no effect. (by the way: putting "the alertHook = 0" in the on
> activateWindow handler doesn't work either.
>
> Any ideas? (Dir MX2004, win2000)
>
> Thanks in advance
> Michael
>
>
>
>
>
> [To remove yourself from this list, or to change to digest mode, go
> to http://www.penworks.com/lingo-l.cgi  To post messages to the list,
> email [email protected]  (Problems, email
> [EMAIL PROTECTED]). Lingo-L is for learning and helping with
> programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to