How to Embed Java in Flash
The Java programming language uses its object-oriented design to allow the use of complex files within Java apps. By importing the correct libraries and using the included objects, you make man file types available for use and manipulation. For example, by using the Java Flash Player API, you can easily import a Flash file into your Java application.
Instructions
-
-
1
Download and install the Java Flash Player API from jpackages.com. You can get the trial version for free or purchase the API.
-
2
Add the downloaded JAR file to your classpath. In the Eclipse project window, click Java Build Path, and then the Add External Jars tab in the right panel. Navigate to the Java Flash Player JAR and click "OK."
-
-
3
Use the Java Flash Player API to import a Flash file into your project:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;
import java.io.*;
import com.jpackages.jflashplayer.*;class FlashTest{
public static void main(String[] args){
FlashPanel.setRequiredFlashVersion("9");
FlashPanel flashPanel = new FlashPanel(new File("Movie.swf")); // loaded movie}
}
-
1