You could just flash the sprite white by changing the sprites image to a copy of the original one with Alpha channel copied to the colour channels.
This copy of the original image is effectively what you said...a pure white version of your sprite frames but with the alpha left intact. Its only 4 lines of code to create the white copy....
If you want to test the code below you will need a image with alpha channel info in it (partly transparent) called "2.png"
// Project: FlashSprite
// Created: 2019-03-07
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "FlashSprite" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetVSync( 1 )
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
// Load an image with alpha
im = LoadImage("2.png")
spr = CreateSprite(im)
// Copy the original image
im2 = CopyImage(im,0,0,GetImagewidth(im),Getimageheight(im))
//Copy alpha channel into color channels
SetImageMask( im2, im, 1, 4, 0, 0 )
SetImageMask( im2, im, 2, 4, 0, 0 )
SetImageMask( im2, im, 3, 4, 0, 0 )
do
if GetRawKeystate(87) // w
SetSpriteImage(spr,im2)
else
SetSpriteImage(spr,im)
endif
Print( "Press W to flash the sprite")
Sync()
loop
A shader is a really good option.
Even without a shader you could slowly modulate how much white is added by using additive blending and a second sprite with its colour modulated so you would get a controlled smooth amount of white added.