This is a short example on calling javascript from flex using ExternalInterface…

Application Source

Please Note:  Javascript has to be on in your browser and the javascript is in the html-template > index.template.html file.