0
流水游戏完成播放时调用其他函数当流水游戏完成播放时调用其他函数
嗨,我在我的网站中使用流水游戏。当流水游戏完成播放音频文件时,我想要调用另一个函数,将其重定向到另一个页面。
这是代码:
load_player = function() {
flowplayer("player",
{
src:HOST + "app/webroot/flow_player/flowplayer-3.2.7.swf",
wmode:'opaque'
},
{
// define an advertisement using content plugin
plugins:{
content:{
url:HOST + 'app/webroot/flow_player/flowplayer.content.swf',
// plugin is initially hidden
display:'none',
// no background and decorations
backgroundGradient:'none', backgroundColor:'transparent', border:0,
// position and dimensions
bottom:0, right:0, width:0, height:0
}
},
onFinish:function() {
window.location = "first_instruction";
}
});
};
onFinish函数路径在window.location中被硬编码。我希望它动态。当它被索引页调用时,它应该将我重定向到first_instruction,当它被first_instruction调用时,它应该将我重定向到second_instruction。
'first_instruction'听起来不像一个有效的网址...或者是一个占位符你的榜样? –