# Completion of FLV - Video Object and FMS

**URL:** <https://forum.kirupa.com/t/completion-of-flv-video-object-and-fms/246823>\
**Category:** flash\
**Created:** [December 14, 2007, 10:21pm UTC](https://forum.kirupa.com/t/completion-of-flv-video-object-and-fms/246823 "2007-12-14T22:21:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jor133d](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jor133d/32/315_2.png) [@jor133d](https://forum.kirupa.com/u/jor133d)\
**Post date:** [December 14, 2007, 10:21pm UTC](https://forum.kirupa.com/t/completion-of-flv-video-object-and-fms/246823/1 "2007-12-14T22:21:37Z")

</div>

I am creating a simple video player with the video object but I am using Flash Media Server.

I can not figure out how to determine the completion of the FLV. Can anyone help?

Here is my code:

```auto

var nc:NetConnection = new NetConnection();

nc.onStatus = function(info)
{
	trace("#NC# " + info.code);
	

	
}
function init()
{
	
	ns = new NetStream(nc);
	vid.attachVideo(ns);
	ns.OnStatus = function(info)
	{
		trace("#NS# " + info.code);
	}
	
	
	_root.loadCurrentCC("bunnel");

	ns.play("Welcome");
	
	
}

play_btn.onPress = function () {
	init();
	play_btn.gotoAndPlay(2);
	if (_root.pageFlipOn == true){
		_root.pageFlipOn = false;
		
	}else{
		_root.pageFlipOn = true;
		_root.loadCurrentCC("blank");
		
		
	}trace(_root.pageFlipOn);
	
	
}

pause_btn.onPress = function () {
	ns.pause();
}

var id:Number;

ff_btn.onPress = function():Void {
  var dest1:Number = ns.time;
  id = setInterval(function():Void {
    ns.seek(dest1 += 2);
  }, 100);
}
ff_btn.onRelease = function():Void {
  clearInterval(id);
}

rw_btn.onPress = function():Void {
  var dest:Number = ns.time;
  id = setInterval(function():Void {
    ns.seek(dest -= 2);
  }, 100);
}
rw_btn.onRelease = function():Void {
  clearInterval(id);
}

nc.connect("rtmp://wdmdfms-live.uwsp.edu/DESTREE_J/");

```
