2012-07-05 217 views
0

我在流水遊戲循環中遇到問題。我嘗試了一堆不同的東西,但我無法讓它循環。它播放一次並停止。流水遊戲未循環

下面是代碼:

HTML:

<div id="home_fplayer" href="/File/1.mp4"><img alt="" src="/File/ld.jpg" /></div> 

JS:

$(document).ready(function() 
{ 
    $f("home_fplayer", {src:"/js/flowplayer/flowplayer.commercial-3.2.7.swf", wmode: 'opaque'}, 
    { 
     key: '#$1432062db092e251814', 
     plugins: 
     { 
      controls: null 
     }, 
     loop: true, 
     clip: 
     { 
      autoPlay: true, 
      onBeforePause: function(clip) 
      { 
       return false; 
      }, 
      onFinish: function() 
      { 
       this.play(0);return false; 
      }, 
      onBeforeFinish: function() 
      { 
       this.play(0);return false; 
      } 
     } 
    }).ipad(); 

    $f("home_fplayer").play(); 
}); 

回答

1

所有你需要做的是設置onBeforeFinish返回false:

$(document).ready(function(){ 
    $f("home_fplayer",{src:"/js/flowplayer/flowplayer.commercial-3.2.7.swf",wmode:'opaque'}, 
     { 
     key: '#$1432062db092e251814', 
     plugins:{ 
      controls: null 
     }, 
     clip:{ 
      autoPlay: true 
     }, 
     onBeforeFinish:function(){ 
      return false; 
     } 
    }).ipad(); 

    $f("home_fplayer").play(); 
}); 
+0

我正在返回false onBeforeFinish。 – danfolkes 2014-02-18 13:37:42