href=http://www.son.washington.edu/~brianp>brianp@u.washington.edu Calling mmOpen within buttonDown kills buttonClick message
ANOTHER CONFIRMED BUG (confirmed in the tech support reply to
my bug post on value of 'loc' changing
in buttonUp vs. buttonDown, where they
should be the same)
Opening an unopened clip using mmOpen within a buttonDown handler
stops the buttonClick message occurring. If you are opening a clip
which is already open, the buttonClick message DOES get through ok.The implications of this are that your buttons may act unreliably if you, for example, are preloading/opening sound effects when you click on buttons. Tread carefully!
Anybody have a solution?
To Reproduce
============
*1. Create a new book.
*2. Create a new field, name it "res" - this is for diagnostics.
*3. Create a button with the following script:
to handle buttonDown; send dbg; mmOpen clip "AAA"; mmYield; end
to handle buttonUp; send dbg UP; end
to handle buttonClick; send dbg CLICK; end
to handle dbg msg
if msg is null
clear text of field "res"
else
put msg &crlf after text of field "res"
end
end
*4. Create another button for closing all open media. Script is
to handle buttonClick
mmclose all
end
*5. Create a clip, call it "AAA"
*6. Save the book and TRY IT! First click on the button to close
all open media. Then click on the main button created in
step 3.
Notice that the FIRST time you press the button, you only get:
buttonDOWN buttonUP ---> however no buttonCLICK - it somehow gets "lost" !!The next time you press the button, now that the clip is open, you get the correct sequence of:
buttonDOWN buttonUP buttonCLICKand things work correctly.
Anybody have a solution?
---------------------------------------------------
Andy Bulka abulka@empire.com.au ph: +613 593-1389
"Author Level - and loving it"
Melbourne TUG (Toolbook User Group) Australia.
---------------------------------------------------
Return to Index
