高手进,帮忙加一句判断flv播放结束代码,谢谢!
下面代码是swf调用flv的一段代码(_root.streamName1是flv的文件名);现在我想在flv播放结束后跳到第二帧(代码最后部分),请问判断flv播放结束的if语句如何写,谢谢!
stop();function onResize(){ m_flvPlayer.setSize(Stage.width, Stage.height);} // End of the functionfunction checkProtocol(url, serverDomain){ var _loc2 = url.indexOf(":"); if (_loc2 < 0) { return (true); } // end if var _loc4 = url.substring(0, _loc2); switch (_loc4) { case "http": { if (serverDomain != "localhost" && url.indexOf("http://" + serverDomain + "/") != 0) { return (false); } // end if return (true); } case "https": { if (serverDomain != "localhost" && url.indexOf("https://" + serverDomain + "/") != 0) { return (false); } // end if return (true); } case "file": { return (true); } } // End of switch return (false);} // End of the functionattachMovie("FLVPlayer", "m_flvPlayer", 0);var argsObj = new Object();argsObj.skinName = _root.skinName;argsObj.streamName = _root.streamName1;argsObj.autoPlay = _root.autoPlay;argsObj.autoRewind = _root.autoRewind;var ncm = m_flvPlayer.addPlugin(new plugins.NCManager(), "NCManager");Stage.align = "TL";Stage.scaleMode = "noScale";Stage.addListener(this);onResize();var my_lc = new LocalConnection();var thisDomain = my_lc.domain();if (argsObj.skinName && checkProtocol(argsObj.skinName, thisDomain) && (argsObj.streamName && checkProtocol(argsObj.streamName, thisDomain))){ m_flvPlayer.setUp(argsObj);} // end if//gotoAndPlay(2);
m_flvPlayer.addEventListener(VideoEvent.COMPLETE,onVideoComplete); private function onVideoComplete():void { gotoAndPlay(); }