A simple program needed, please.

Find quick help here to get you started with Hollywood
Jan
Posts: 26
Joined: Sun Sep 17, 2017 10:28 am
Location: Slovakia
Contact:

Re: A simple program needed, please.

Post 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.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: A simple program needed, please.

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: A simple program needed, please.

Post 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...
Jan
Posts: 26
Joined: Sun Sep 17, 2017 10:28 am
Location: Slovakia
Contact:

Re: A simple program needed, please.

Post 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.
Jan
Posts: 26
Joined: Sun Sep 17, 2017 10:28 am
Location: Slovakia
Contact:

Re: A simple program needed, please.

Post 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
Post Reply