opencard and visual effect
Craig Newman
craig at starfirelighting.com
Tue May 2 12:16:35 EDT 2023
Klaus.
Why aren’t you doing this in the forum???
I made a stack with two cards. Card 1 has a button on it:
global tTime
on mouseUp
put the ticks into tTime
visual effect "checkerBoard" slow
go cd 2
end mouseUp
In the card 2 script:
global tTime
on openCard
put the ticks - tTime into fld 2
end openCard
I get about 60 ticks, so it seems the message is sent AFTER the visual effect completes. Know that with “preOpenCard” I get 0 ticks; the message is sent before the visual effect.
Craig
> On May 2, 2023, at 10:21 AM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi Craig,
>
>> Am 02.05.2023 um 16:05 schrieb Craig Newman via use-livecode <use-livecode at lists.runrev.com>:
>>
>> Klaus.
>>
>> I would guess that as soon as the card was navigated to, that is, before any visual effect starts or finishes.
>> Not sure how to test this since I am not sure what messages or properties might be set before, during or after a visual effect runs.
>>
>> Craig
>
> thank you, but I need certainty! :-)
>
> My scenario:
> ...
> lock screen for visual effect
> set the effectrate to 300
> go next cd
> unlock screen with visual wipe left very slow
> ...
>
> and on the "next card" I need to measure the time until the
> user hits a certain key (1 or 2) on the keyboard like this:
> -------------------------
> ## Script of the "next" card:
> local tMillisecs
>
> on opencard
> put the millisecs into tMillisecs
> end opencard
>
> on keydown tKey
> if tKey = 1 OR tKey = 2 then
> put the millisecs - tMillisecs into tDuration
> ...
>
> You get the picture, so I need to measure this precisely!
>
>
>
> Best
>
> Klaus
>
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list