Page 1 of 1
Timing of openCard with visual effect.
Posted: Tue May 02, 2023 5:28 pm
by dunbarx
Klaus has gone to the dark side. I will miss him.
He had asked on the use-list if an openCard message is sent before or after a visual effect runs its course. I made a stack with two cards. On card 1, a button with:
Code: Select all
global tStartTime
on mouseUp
put the ticks into tStartTime
visual effect "checkerBoard"
go cd 2
end mouseUp
On the card 2 script:
Code: Select all
global tStartTime
on openCard
put the ticks - tStartTime into fld 2
end openCard
I get about 44 ticks in field 2
If I instead use "preOpenCard" I always get 0 ticks. So "openCard" is sent after the visual effect finishes. I find this counterintuitive, but at least the fact should be somewhere in the dictionary, best in the "visual effect" page.
Craig
Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 5:41 pm
by dunbarx
I generally dislike the message watcher, mainly because we still cannot filter for ONLY messages we want. This has been discussed and forgotten.
Anyway, if the message watcher is open when one clicks the button on card 1, the watcher records "mouseUp", navigation occurs and one can see the change to card 2 and then the visual effect. But only after that effect finishes does the watcher record "openCard".
Klaus, I think that about does it.
Craig
Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 5:49 pm
by Klaus
Klaus has gone to the dark side. I will miss him.
Oh, Craig, I'm not your father!
And do you think that a "normal" visual effect only takes 44 ticks?
Please set the effectrate and try again with a "very slow" effect, so you know how much that should take.
There is also much more that I posted on the mailing list, you should add this here for further thoughts...

Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 6:33 pm
by dunbarx
Klaus.
"Very Slow" took 123 ticks. Things become clearer when going "very slow".
Watching this it seems that the process takes about 2 seconds (125 ticks). but the card seems to change from card 1 to card 2 right away, as you can see because the red graphic (which is only on cd 2) appears right away.
Craig
Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 6:39 pm
by Klaus
What did you set for -> the effectrate? And please use millisecs, that is more precise.
but the card seems to change from card 1 to card 2 right away, as you can see because the red graphic (which is only on cd 2) appears right away.
Sorry, Craig, "seems" and my eyes are not precise enough, I already tried this.
Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 7:03 pm
by dunbarx
Klaus.
If I set the effectRate to, say "1000", or 200 or 2000, it still shows that the navigation occurs right away, then the effect runs, and then a tick value appears in fld 2 of cd 2.
Craig
Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 7:09 pm
by dunbarx
Klaus.
I do not quite see how the effectRate and the various "speed" parameters associated with the visual effects themselves interact, but they certainly do. But the strict sequence of events does not seem to alter. To me it appears that the "openCard' message is sent after the visual effect terminates.
Other opinions, anyone?
Craig
Re: Timing of openCard with visual effect.
Posted: Tue May 02, 2023 10:04 pm
by Klaus
Hi Craig,
dunbarx wrote: ↑Tue May 02, 2023 7:03 pm
Klaus.
If I set the effectRate to, say "1000", or 200 or 2000, it still shows that the navigation occurs right away, then the effect runs, and then a tick value appears in fld 2 of cd 2.
Craig
the effectrate only works when using the VERY SLOW*** option with a visual effect
Code: Select all
...
## half a second
set the effectrate to 500
lock screen for visual effect
go next cd
unlock screen with visual wipe left very slow
## Et voilà, half a second :-)
## more or less...
...
*** I find this mentally very challenging!
