请问有谁用java做过flash播放器的,小弟需求一份源码。有的请发给我一份,谢谢O(∩_∩)O.邮箱[email protected]

解决方案 »

  1.   

    自己找了很多jar包,但都有bug。希望能发一份实用性高的,能顺利播放flash的,谢谢。
      

  2.   

    DJ Native Swing
    使用swt来实现,前提是电脑必须安装有flash player,用native调用。
    在xp下:
    代码:
    /*  
     * Christopher Deckers ([email protected])  
     * http://www.nextencia.net  
     *  
     * See the file "readme.txt" for information on usage and redistribution of  
     * this file, and for a DISCLAIMER OF ALL WARRANTIES.  
     */  
    package chrriis.dj.nativeswing.swtimpl.demo.examples.flashplayer;   
      
    import java.awt.BorderLayout;   
      
    import javax.swing.JComponent;   
    import javax.swing.JFrame;   
    import javax.swing.SwingUtilities;   
      
    import chrriis.common.UIUtils;   
    import chrriis.dj.nativeswing.swtimpl.NativeInterface;   
    import chrriis.dj.nativeswing.swtimpl.components.JFlashPlayer;   
      
    /**  
     * @author Christopher Deckers  
     */  
    public class SimpleFlashExample {   
      
      public static JComponent createContent() {   
        JFlashPlayer flashPlayer = new JFlashPlayer();   
        flashPlayer.load(SimpleFlashExample.class, "1.swf");   
        return flashPlayer;   
      }   
      
      /* Standard main method to try that test as a standalone application. */  
      public static void main(String[] args) {   
        NativeInterface.open();   
        UIUtils.setPreferredLookAndFeel();   
        SwingUtilities.invokeLater(new Runnable() {   
          public void run() {   
            JFrame frame = new JFrame("DJ Native Swing Test");   
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   
            frame.getContentPane().add(createContent(), BorderLayout.CENTER);   
            frame.setSize(800, 600);   
            frame.setLocationByPlatform(true);   
            frame.setVisible(true);   
          }   
        });   
        NativeInterface.runEventPump();   
      }   
      
    }截图:
      

  3.   

    如果下载不了jar包 
    我的资源有:http://download.csdn.net/download/geminit2011/4803008
      

  4.   

    这个我用过,播放带操作的flash就不行了。而且每打开一个flash一开始就有声音,就像打开网页窗口的那种声音。我查了API也没查到关闭那种声音的方法。请问还有别的jar包吗?
      

  5.   

    你看过它官网例子吗。例子中的JFlashPlayer demo是有操作的。你看看行不行,至于其他的我看看有没有,目前想到的就是他,你试试看,官网的例子是有操作的。
      

  6.   

    因为它其实并不是自己写了一个flash player,而是调用系统中的flash player,如果不可以,是不是其他的问题,你试着用flash player播放一次试试。应该不会有你所说的问题。
      

  7.   

    官网上我看了,我把demo都下载下来了。它自带的flash是可以操作的,但是对别的flash就不行了。开始我以为是自己的flash的原因,但是我的flash用浏览器打开是没有问题的,而且可以操作的。我从网上下的那些flash用浏览器都能打开并且能操作,就是用它的组件操作不了。它好像并不是支持所有的能操作的flash.