Page 4 of 4

Re: A simple program needed, please.

Posted: Tue Feb 07, 2023 6:30 pm
by Jan
The video 1 plays at the beginning.
Then the slideshow is shown.
And then video 2 is played if the users closes the program.

Reading the documentation I learnt that the events are accumulated in a queue, so I guess I need to clear all events before the slideshow is started. But is seems that ClearEvents() command is obsolete. Do you know what's the replacement for it? The documentation is not clear enough about it.

Meanwhile I used SetEventTimeout(0) before the video 1
and SetEventTimeout(30) after it's finished. It works! :D

PS: Oh, and I exchanged the CheckEvent command for WaitEvent and keeps working, and it is less CPU demanding now I guess.

Re: A simple program needed, please.

Posted: Tue Feb 07, 2023 8:22 pm
by Bugala
There is FreeEventCache()
but do keep in mind that it is not part of public API, hence I guess there is no guarantee it couldn't cause some trouble in future, or even in current, versions.

Re: A simple program needed, please.

Posted: Sat Feb 11, 2023 11:11 pm
by airsoftsoftwair
Jan wrote: Tue Feb 07, 2023 6:30 pm Reading the documentation I learnt that the events are accumulated in a queue, so I guess I need to clear all events before the slideshow is started. But is seems that ClearEvents() command is obsolete. Do you know what's the replacement for it? The documentation is not clear enough about it.
Why do you want to flush the event queue? I don't quite understand that. Shouldn't be necessary at all...

Re: A simple program needed, please.

Posted: Sun Feb 12, 2023 12:15 pm
by Jan
Let me explain.

1. There is a video playing right after the program is launched
2. A slideshow starts right after that and mouse click moves it forwards, in a loop.

Now, if I press the mouse button during the video replaying, nothing happens, but as soon the slideshow is displayed, it is automatically moved to next slide, or even further (depending on how many times I clicked the mouse during video replaying).

But I solved it with the SetEventTimeout, as I described above.

Re: A simple program needed, please.

Posted: Mon Mar 06, 2023 6:07 pm
by Jan
Guys, I just want to say THANK YOU ALL for your help. Here's the result:

Image

https://www.amikit.amiga.sk

Cheers,
Ján