Here's a bit of info about the .asJson expression for the canvas:
And here's how to do it:
global number pixelCount = 0
global number percentClear = 0
every 1.0 seconds
--- array: load from canvas.asJSON
--- set pixelCount to 0
------ repeat canvas.width*canvas.height times
------ Array at (0,0,loopindex*4+3) = 0
--------- add 1 to pixelCount
--- set percentClear to pixelCount/canvas.width*canvas.height
In the array comparison instead of checking if the alpha is 0 you could for instance use <128 to count any pixel less than 50% trasparent.