---
title: "java 中播放ｆｌａｓｈ（ｆｌａｓｈｐａｎｅｌ）"
author: "thtwin"
date: "2010-03-14T08:52:23Z"
tags: []
categories: ["Web前端"]
slug: "java"
draft: false
lastmod: "2010-03-14T08:52:23Z"
id: 615048
url: "https://thtwin.iteye.com/blog/615048"
---

{ 
try { 
flashFilePath = "**.swf"; 
　　　　flashPanel = new FlashPanel(new File(flashFilePath)); 
　　　} catch (FileNotFoundException e1) 
{ 
e1.printStackTrace(); 
} catch (JFlashLibraryLoadFailedException e1) 
{ 
e1.printStackTrace(); 
} catch (JFlashInvalidFlashException e1) 
{ 
e1.printStackTrace(); 
} 
} 

然后在有一个就是： 

{ 
FlashPanel.setRequiredFlashVersion("6"); flashPanel.setFlashCallObject(jLabel3); 
flashPanel.setVariables("myGreeting=hi&myNumber=1&myVar=good%20job");flashPanel.setBounds(0, 0, 260, 60); flashPanel.setBounds(0, 0, 260, 60); flashPanel.play(); 
jLabel.add(flashPanel); 
} 
简单的ｆｌａｓｈｐａｎｅｌ就行了 
不过不知道ｆｌａｈｓｐａｎｅｌ有什么用处。 
触发加不上加上了也是　从ｆｌａｓｈ那里得到的出发。 
在这里加一个透明的层再加触发也不支持。。。。。 


对了flashpanel的ｊａｒ包下载地址。。我找找找，，想想貌似是有真么一个东西 
import com.jpackages.jflashplayer.FlashPanel; 
ｏｋ就这么多了。。。