Hi,
Thank you for your enquiry.
As you are probably aware, DocView and Browser objects use a completely different window than that of the main Opus publication and Opus cannot detect mouse movement within these objects. It is therefore possible that the 'Reset' feature will assume that there has been no activity in the publication and may take the user back to the menu.
One workaround would be to disable the publication-wide 'Reset' property and creating your own reset action which you could apply only to pages which do not contain Browser or DocView objects.
To do this, I would recommend adding a Script Object to the pages where you wish to keep track of inactivity. In this Script Object, use the following code:
Code:
time = 0
while (true) {
origpos = GetMousePosition()
origx = origpos.x
origy = origpos.y
wait(0.1)
newpos = GetMousePosition()
newx = newpos.x
newy = newpos.y
if (origx == newx && origy == newy) {
time = time + 0.1
} else {
time = 0
}
if (time > 10) {
GotoPage("Menu")
}
}
This code checks the current position of the cursor and stores the current X position to a variable named 'origx' and the current Y position to a variable named 'origy'.
A tenth of a second later, the mouse position is checked again, but this time the X and Y co-ordinates are stored to variables named 'newx' and 'newy'.
The script then checks to see if the original X and Y co-ordinates are the same as the new ones. If so, the mouse has not moved in this 0.1 second period and a variable named time is increased by 0.1.
If the original X and Y co-ordinates do not match the new co-ordinates, the mouse has obviously moved in this period and the time variable is reset back to zero.
Finally, an If statement checks to see if the time variable has reached 10 (i.e; the mouse has been inactive for 10 seconds). If so, the user is taken page to a page called "Menu".
I have attached the completed version of this example for your perusal. You would simply need to copy this script object onto any page which should monitor inactivity, but do not copy this onto pages which contain DocView or Browser objects.
I hope this helps. Please do not hesitate to contact me if you have any further queries.
Kind regards,