I have many images that may be facing either left or right so I just store them one way and flip them on demand when needed. In this particular case, the images need to be flipped. These images are the avatar images for the game and depending on whether they are on the left or right of the game window, I can flip them on demand. I do this to cut down on the amount of images that I am using and to save disk space.
As for the blinking eyes, there are 3 images that are used to give the illusion of blinking eyes (fully open, halfway closed, fully closed).
EDIT: I have pretty much got everything working the way I want it to. I figured out how to fix the white background issue in Windows.
The Timer in Windows is still a bit inconsistent. It sometimes skips a blinking stage and I'm not sure why. I used SELECT CASE since I have 4 possible instances for eye blinking (fully open, halfway closed, fully closed, and halfway open) and this simply repeats. I do change the Timer period between fully open and halfway open to give the illusion of the eyes being open longer before blinking again. Otherwise you'd get a headache from the constant blinking with no rest.
Anyway, here is the Timer code:
Select Case intYugiBlinkState
Case 0
imgTmp(2) = MirrorPNG(GetPNG("CharPics", "Pic2", 1))
intYugiBlinkState = 1
tmrYugiBlink.Period = 7000
Case 1
imgTmp(2) = MirrorPNG(GetPNG("CharPics", "Pic6", 1))
intYugiBlinkState = 2
tmrYugiBlink.Period = 50
Case 2
imgTmp(2) = MirrorPNG(GetPNG("CharPics", "Pic7", 1))
intYugiBlinkState = 3
Case 3
imgTmp(2) = MirrorPNG(GetPNG("CharPics", "Pic6", 1))
intYugiBlinkState = 0
End Select
imgYugi(2).Refresh(False)
If something seems out of whack, let me know.
MirrorPNG is the Function that horizontally flips the image and mask when I need it to.
GetPNG is the Function that grabs the specified PNG image from the database.
While writing this I realized a better way to go. I should simply store the fully open, halfway closed and fully closed images in 3 variables this way I am not bogging down resources by continually grabbing the same images.
EDIT2: I have changed the Timer code to the following and it seems a bit faster now:
Select Case intYugiBlinkState
Case 0
imgTmp(2) = imgTmp(8)
intYugiBlinkState = 1
tmrYugiBlink.Period = 7000
Case 1
imgTmp(2) = imgTmp(6)
intYugiBlinkState = 2
tmrYugiBlink.Period = 50
Case 2
imgTmp(2) = imgTmp(7)
intYugiBlinkState = 3
Case 3
imgTmp(2) = imgTmp(6)
intYugiBlinkState = 0
End Select
imgYugi(2).Refresh(False)