我已经嵌入一个SWF的三命名为video.swf。次
I have embedded a single swf three times named as video.swf.
主权财富基金名称是 VIDEO1 视频2 和 VIDEO3
The swfs names are video1 , video2 and video3.
如果我打一个swf,我希望得到当前播放SWF的名字?
这可能吗?
我使用的是JavaScript进行通信。
I'm using javascript for communication.
我必须做一些非常相似的工作对斯沃琪/ MTV 项目(在一个页面上的多个嵌入式播放器和播放只有一个剪辑在一个时间(扮演着不同的剪辑,将暂停其他等) 例如,
I had to do something very similar for work on a project for Swatch/MTV (having multiple embedded players on a page and playing only one clip at a time (playing a different clip, would pause others, etc.) e.g.
var vids = ['video/file/72066f40bfcaea46e10460585b4e4bcb.mp4','video/file/3d5db6b87f9cdacb016c9c55afed1e08.mp4','video/file/c18b04a1a548cbf20609de70a106d7cc.mp4','video/file/4568a11f3f6a7ff467a85fefe2ac08e6.mp4','video/file/b91081d37a81692194c0e34580958c51.mp4']; for(var i = 0 ; i < vids.length; i++){
var flashvars = {};
flashvars.video_url = 'http://www.swatchmtvplayground.com/'+vids[i];
flashvars.video_id = i;
flashvars.locale = "gb";
flashvars.skin = 'upperBackground:0xf8c3c4,lowerBackground:0xe2e2e2,generalControls:0x000000,slider:0xb58f8f,progress:0xe2e2e2';
var params = {};
var attributes = {};
attributes.id = "mediaplayer"+i;
so = swfobject.embedSWF("http://www.swatchmtvplayground.com/flash/mediaplayer/mediaplayer.swf", "mediaplayer"+i, "578", "345", "10.0.0", false, flashvars, params, attributes);
}
function pauseAllPlayers(exceptThisOne){
for(var i = 0 ; i < vids.length ; i++) if(exceptThisOne != "mediaplayer"+i) document.getElementById("mediaplayer"+i).pause();
}
要获得ID我使用一个整洁的小把戏我没有previously知道如何使用Zeh软件费尔南多的优秀导游(执行JS用ActionScript创建):获取SWF的HTML对象/嵌入ID从Flash影片本身
to get the id I've used a neat little trick I didn't previously know about (executing JS created with actionscript) using Zeh Fernando's excellent guide: Getting the SWF’s HTML object/embed id from within the Flash movie itself
心连心