You can access function in an Applet like this.
Appletcode:
Code:
import java.awt.Graphics;
import java.applet.Applet;
public class HelloWorld extends Applet
{
String myString ="Das ist mein Hallo-Text";
public void paint(Graphics g)
{
g.drawString(myString, 25, 20);
}
public void setString(String aString)
{
myString = aString;
repaint();
}
}
HTMLCode:
Code:
<html><head><title>Test</title>
</head><body>
<applet code="HelloWorld" name="Hallo" width=150 height=25>
</applet><br>
<form name="Eingabe" action="">
<input type="text" name="Text">
<input type="button" value="Test"
onclick="document.Hallo.setString(document.Eingabe.Text.value)">
</form>
</body></html>
From Flash you can directly call javascript functions with the getUrl function:
getUrl("javascript:yourfunction()");
I think it should simular work from the applet, so maybe the processing link function works:
link("javascript:yourfunction()");
Unfortunatly you can not call function in flash with javascript you can only change values.
Take a look here:
http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/