You call the javascript function from your Flash button.