Turns out a FlashVar <param> is easiest, and also added some javascript callback for outputting error and debug message, and for getting 'fallback' testing m-lab nodes.
Include Flash errors and debug message as HTML comments in the document.
Put a newline before and after error and debug message to make them more readable in the generated document source.