I will here collect a series of links of useful information on the interaction between flash and JavaScript, Until I have evaluated all relevant infos, to write a good summary on common practices.

  1. SWFObject has grown up! version 2.0
    • static
    • dynamic
  2. The famous SWFObject to easily embed flash content in html, that was previously hosted on deconcept.com has now moved to google.code basically there are 2 ways to embed your swf into your HTML site:

    more to come...
    her a basic code sample for the integration using swf object, including parameters, flashvars and attributes. (for many external interface interactions, you will need to give your swf an ID and a name)
    here the javascipt to embed:

    
    
    JavaScript:
    1. <script src="http://flashcrobat.noesi.co.uk/js/swfobject.js" type="text/javascript"><!--mce:0--></script>
    2. <script type="text/javascript"><!--mce:1--></script>
    3. <!-- later in the html page comes the div tag where you want your swf to be embedded where you can put in your alternative text, in case someone has javascript disabled, or no flash plugin installed.-->
    4. <div id="swf-div">
    5.     You need Javascript activated and the flash player plugin installed to be able to view this content.
    6. The newest Flash Player can be downloaded here:
    7.  
    8. <a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></div>

    Attention!!:
    giving the id or the name identical name to the swf file causes javascript errors on IE!! took me ages to find the reason for these. So just call your id and name differently than your swf is called.

  3. external interface approach
  4. this seems to be till now the best and easiest reference I found on smooth communicatin between Javascript and the swf in both directions. unfortunatley this only seems to work in AS2. The old fscommand now has been replaced with the externalInterface class. more to read in the Adobe.liveDocs. found on: http://flexion.wordpress.com/ source files: onBoxNet

  5. AS3 Script Injection
  6. Complete and unmodified JavaScript and/or VBScript functions, class objects and applications are stored inside AS3 files using XML, and are then parsed, sent to the browser, and executed. This is an ideal solution for Flash/Flex developers who need JavaScript to interact with the user's browser, but might not have full access to the webpage or server that their SWF application is actually hosted on. Flash Ads, YouTube-style video players, and games that may be hosted across multiple (and possibly unforeseen) webpages are the first things that come to mind. on: actionscript.org

  7. Passing variable from JavaScript To AS3
  8. A brief and basic recollection about passing vars from JS to AS3. found on: metah.ch

  9. Local Connection Actionscript - Communicate between seperate Flash files
  10. Communication between two seperate flash files placed on the same page (or even running simultaneously on one machine) is a nice way to spread a project out. You can send variable, call functions, pretty much do anything in one swf from another. found on: blog.circlecube.com

  11. Flash and Google analytics
  12. This also fits in this cathegory, as most functionalities are handled by Javascript. I will update this entry after have=ing implemented the code on my current Project. found on: flashenabledblog.com