My browser-deployed Flex app, built in FB4, is using the ExternalInterface. The Flex app gets some search terms from the user, goes out to a webservice for some data, and then pushes some html markup out to a DIV in the HTML document using the ExternalInterface.call() method. I send the content across the bridge as a parameter to javascript function that appends a child to the target DIV. Nice and simple with the EI. However, I have a couple of questions about the logistics of developing this sort of application in FlashBuilder.
When "Export Release Build" is chosen from the Project menu in FB4, it destroys and recreates the HTML deployment wrapper for the SWF. Is there any way for the developer to provide an HTML document template to FB, marked up with comments/metadata tags, such that only the Adobe browser-sniffing code and SWF-embed code gets overwritten but the rest of the HTML document (the user-portion) remains intact? Also, is it possible to set up a project in FB4 that uses the ExternalInterface, where you can step through code in the debugger and also see pushed content being rendered in the HTML document hosting the SWF? In debug mode it seems not possible to work with your actual HTML host document and its javascript functions-- or am I missing something obvious? I am pretty new to FB and that could easily be the case. Finally, will future versions of the ExternalInterface expose the DOM of the hosting document via ActionScript object wrappers? Thanks