Flash只需要知道flv文件的路径就可以了,但这部分功能她又无法实现,不过她可以用ExternalInterface来调用“壳”里提供的函数。
正好SWFKit可以起到一个桥梁的作用,将“壳”里的函数与Windows应用程序相关功能结合起来,于是问题解决。
Flash ActionScript代码如下:
import flash.external.ExternalInterface;
_btn.onPress = function()
{
var s = ExternalInterface.call("selectFLVFile");
media_display.contentPath = s;
};
SWFKit FFish Script代码如下:
function selectFLVFile()
{
var f = "FLV files(*.flv)|*.flv;|All files(*.*)|*.*|";
var res = Dialogs.fileOpen(f, "", "", false);
return res;
}
[url=http://www.flashxm.com/wp-content/uploads/flvplayer_flash.rar]
[color="#44a1d0"]下载Flash源文件(download)[/color]
[/url]
[url=http://www.flashxm.com/wp-content/uploads/flvplayer_win32.rar]
[color="#44a1d0"]下载FLV Player(download)[/color]
[/url]
本文转自:http://www.5uflash.com/flashjiaocheng/Flashyingyongkaifa/1025.html
正好SWFKit可以起到一个桥梁的作用,将“壳”里的函数与Windows应用程序相关功能结合起来,于是问题解决。
Flash ActionScript代码如下:
import flash.external.ExternalInterface;
_btn.onPress = function()
{
var s = ExternalInterface.call("selectFLVFile");
media_display.contentPath = s;
};
SWFKit FFish Script代码如下:
function selectFLVFile()
{
var f = "FLV files(*.flv)|*.flv;|All files(*.*)|*.*|";
var res = Dialogs.fileOpen(f, "", "", false);
return res;
}
[url=http://www.flashxm.com/wp-content/uploads/flvplayer_flash.rar]
[color="#44a1d0"]下载Flash源文件(download)[/color]
[/url]
[url=http://www.flashxm.com/wp-content/uploads/flvplayer_win32.rar]
[color="#44a1d0"]下载FLV Player(download)[/color]
[/url]
本文转自:http://www.5uflash.com/flashjiaocheng/Flashyingyongkaifa/1025.html