how can I stop a mouseenter-command
janschenkel at yahoo.com
Fri Nov 13 05:46:25 CST 2009
Is your tMouseOut variable declared outside of the handlers? Otherwise, tMouseOut is just a separate variable in each handler's context.
Also, may I suggest renaming such script-local variables, starting with an 's' instead of a 't' - see also the Scripting Style Guide here: <http://www.fourthworld.com/embassy/articles/scriptstyle.html>
Of course, it's not mandatory, but it helps :-)
Quartam Reports & PDF Library for Revolution
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
--- On Fri, 11/13/09, Reinhold Venzl-Schubert <r.venzl-schubert at macbay.de> wrote:
> From: Reinhold Venzl-Schubert <r.venzl-schubert at macbay.de>
> Subject: how can I stop a mouseenter-command
> To: use-revolution at lists.runrev.com
> Date: Friday, November 13, 2009, 3:40 AM
> I have a lazy finger and don't want to click the mouse.
> When the mouse enters a button on my card its script shall
> wait 1 second.
> When meanwhile the mouse has leaved, the script shall
> Only when the mouse stays over the button the script shall
> work on.
> Therefore my button has a script like this:
> on mouseenter
> put "inside" into tMouseOut
> wait 1 second
> if tMouseOut is not "inside" then
> exit mouseenter
> ## do anything important
> end if
> end mouseenter
> on mouseleave
> put empty into tMouseOut
> end mouseleave
> But my script works as well as the mouse stay over the
> button or leave it.
> What is my mistake.
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
More information about the use-livecode