No, proc_late should be about here;
function flash()
{
var temp2;
proc_late;
while (player == null) {wait (1);}
........

But don't know if it works.
Anyway do you also have placed "define flash_light skill96;" at the top of the script?