getPixelAlpha

.getPixelAlpha( x, y )

Returns the alpha value of the pixel located at the given x/y location. This is a value from 0.0 to 1.0.

collisionMap = new Image( 'collisions.png' )

alpha = collisionMap.getPixelAlpha( x, y )
if alpha > 0.5
    player.kill()
end

See also

setPixel - getPixelRed - getPixelGreen - getPixelBlue