Communication between Flash and JavaApplet using Javascript as the platform
The ExternalInterface class of Flash 8 provides a convenient way for Flash to communication with Javascript. In the above example, clicking the "Add Food" button in the swf on the left will call a JS function which can place food randomly in the applet on the right to feed the bugs. The number of living bugs will be transferred to the swf through JS from time to time.
The above JavaApplet is made with Processing. You may see another version of this life simulation here.