|Impressario for Authorware||All||Interactivity||All|
Due to a quirk (bug) in Authorware, the Impressario sprite will lose the ability to trap mouse events, such as mouseWithin, mouseUp, mouseDown, etc. each time the Authorware screen is redrawn -- i.e., once the user clicks RETURN in a text box or when scrollbars are redrawn.
There is a workaround solution, described below...
The easiest way to ensure that the Impressario sprite can receive the user's mouse events is to force a refresh by erasing and redisplaying it after each interaction with Authorware. The Scripting Sample, on our sample page, illustrates this workaround.
The following code for erasing and redrawing an Impressario sprite is placed in a calculation attached to the Sprite interaction icon, so it is executed each time an interaction occurs:
-- Erase and redisplay the hidden dummy Impressario sprite so that Impressario retains focus
-- and accepts mouse clicks
Impressario Dummy is an Impressario sprite icon that is linked to a very small, empty PDF document; this makes the refresh very quick. Even though the dummy sprite is redrawn, that action forces the focus back to Impressario, so that you can continue to interact with the PDF document.
Another trick is to set the Dummy Impressario sprite to display in layer -1. This prevents any flickering that may occur.