I use an interaction icon to do the following: the AW piece shows a TOC
with hotspots, a go-to-main-menu button, an arrow pointing the TOC entry
the mouse is over. The conditional manage the following icons
1/ two (for now) hot spots corresponding to the TOC entry the user can
click on,
2/ a conditional which is used to make the arrow (vertically) follow
the mouse, but only if the mouse is in some bounds (Perpet=1 & CursorY>89 &
CursorY<469 & CursorY<>FlecheY & CursorX>49 & CursorX<471) and if it has
moved,
3/ One button to go back to main menu,
4/ a conditional which put a variable (Perpet) to 1 if it eguals 0.
5/ four (must eventually be five) other conditionals testing a variable
send through a JumpFileReturn("ch_llcb"; "RetourChapitre") to know what the
user last clicked in the chapter piece.
NB: the "Perpet" (it's really a non-sense name) variable is used to have
the arrow be moved to the vertical position of the mouse by entering the
interaction. Before using this trick the arrow didn't move until the user
moves the mouse, as a result the mouse was in the middle of the TOC and the
arrow on the top.
On my machine this works almost fine: from time to time the arrow do not
follow the mouse until the mouse go out of the limits and then back. AND
when I burn a CD-R and use it on the same machine things go worst : the
arrow follows the mouse just a few seconds before being blocked (until the
mouse goes out of the range then back in, but the move is quickly blocked
again).
The question is:
How can I have my arrow bitmap always follows the mouse ?
Is my interaction icon too big to be treated as a whole ? Is the
conditional of the arrow too complex to be treated efficiently ?
--
Jean-Marc Dubois
-----------
DCAV, Université Bordeaux 2 (dub...@msha.u-bordeaux.fr)
Ascola (jean...@ascola.fr)
-----------
If I understand your TOC "moving arrow" correctly, I think there is a
simpler and more reliable method you can use to achieve the same effect.
Instead of using a conditional response in your TOC interaction to move
the arrow, instead use a PERPETUAL ANIMATION that is set up BEFORE you
enter the interaction.
I would suggest a "To Calculated Point on Line" type animation applied
to your pointer arrow, where you define a vertical animation path that
lies to the left of your TOC entries. The BASE value (at the top) should
be 1 and the END value (at the bottom) should be N, where N is the
number of lines in your TOC. The Animation is PERPETUAL.
Now you have to put the right stuff in VARIABLE/EXPRESSION to make your
arrow accurately track the mouse pointer position over lines in the TOC.
Suppose that in your TOC font, each line of text is 20 pixels tall, and
that the top of the first line of text in the TOC has a y-coordinate of
150 pixels from the top of the screen. Then the expression,
INT((CursorY-150)/20)+1
will do the trick. Note that, because of the "integer part" function,
the arrow won't move smoothly up and down, but will jump from line to
line, which is what you want. If you move the mouse pointer above or
below the TOC, the arrow will "stick" at the top or the bottom of its
range, which seems to be desirable behavior. Bonne chance avec cette
fleche roulante!
Eric
1/ I put the conditional which tests the position of the cursor on
Automatic: When True,
2/ I leave my Perpet variable,
3/ I change the move icon to
Timing: Time (sec)
Concurrency: Wait Until Done
As it seems the first problem comes from using Automatic: On False to True.
Then I got the move icon leaving trace on the screen : that's why I changed
its option so it's more effective (quick).
To Eric Halsey : merci pour la solution proposée.