I know Flash can use ExternalInterface to call Javascript functions but I don\'t know if it can call applet also like that. Maybe it can be done by SWF -> JS -> Applet, and back
Applets can communicate with JS, and JS can control applets. See these examples of Java/JavaScript interaction.