12-14-2022, 03:31 PM
Here's the glitch:
Hardware images only stay in your GPU buffer for a single call of _DISPLAY, and then they flush themselves clean. What you're doing here is basically:
_DISPLAY the Hardware Image
IF ScreenIcon = 0 THEN _DISPLAY ... umm... a blank screen. There's nothing in the buffer now. We just cleared it!
Image, Nothing, Image, Nothing, Image, Nothing.... <-- And there's the old style film projector flashing that you're seeing in your code.
If you're going to use hardware images, stick to _DISPLAY and let the one call update your whole screen at once. Adding in the _AUTODISPLAY with the _DISPLAY ends up giving you multiple calls to display, resulting in the issue that you're having.
Unrelated note: There's really no need to have that KILL in there. While the program is running, it's going to create and overwrite that file repeatedly. Save a little disk wear and just reserve that KILL for when the user exits the program.
Unrelated note2: Since these are all so small, I'd honestly just make an array for my images, load them all once at start-up, and then forgot about them. One disk access to read and extract your images, and that's all you'd ever need. From then on, you just run through the array. (I wouldn't do a whole movie in such a manner, but a small array of just a few dozen images? Why not?)
Code: (Select All)
_Display
If _ScreenIcon = 0 Then _AutoDisplay
Hardware images only stay in your GPU buffer for a single call of _DISPLAY, and then they flush themselves clean. What you're doing here is basically:
_DISPLAY the Hardware Image
IF ScreenIcon = 0 THEN _DISPLAY ... umm... a blank screen. There's nothing in the buffer now. We just cleared it!
Image, Nothing, Image, Nothing, Image, Nothing.... <-- And there's the old style film projector flashing that you're seeing in your code.
If you're going to use hardware images, stick to _DISPLAY and let the one call update your whole screen at once. Adding in the _AUTODISPLAY with the _DISPLAY ends up giving you multiple calls to display, resulting in the issue that you're having.
Unrelated note: There's really no need to have that KILL in there. While the program is running, it's going to create and overwrite that file repeatedly. Save a little disk wear and just reserve that KILL for when the user exits the program.
Unrelated note2: Since these are all so small, I'd honestly just make an array for my images, load them all once at start-up, and then forgot about them. One disk access to read and extract your images, and that's all you'd ever need. From then on, you just run through the array. (I wouldn't do a whole movie in such a manner, but a small array of just a few dozen images? Why not?)