# FLV // need to finish some code

**URL:** <https://forum.kirupa.com/t/flv-need-to-finish-some-code/246690>\
**Category:** flash\
**Created:** [December 13, 2007, 2:41pm UTC](https://forum.kirupa.com/t/flv-need-to-finish-some-code/246690 "2007-12-13T14:41:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Belisario](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Belisario](https://forum.kirupa.com/u/Belisario)\
**Post date:** [December 13, 2007, 2:41pm UTC](https://forum.kirupa.com/t/flv-need-to-finish-some-code/246690/1 "2007-12-13T14:41:33Z")

</div>

Hi!, this is my first post, i hope i can from here be part of this community, ok here is my question:

im using a FLV as intro for a webpage, so, i want to preload or do the buffering and then start to run, im using this code  
[COLOR=Silver]  
[COLOR=Purple]buffer\_txt.html = true;

var connection\_nc:NetConnection = new NetConnection();  
connection\_nc.connect(null);  
var stream\_ns:NetStream = new NetStream(connection\_nc);  
stream\_ns.setBufferTime(15);  
myPlayer.attachVideo(stream\_ns);  
stream\_ns.play(“[http://www.feedbackestudio.com/2m/demo4.flv](http://www.feedbackestudio.com/2m/demo4.flv)”);

var buffer\_interval:Number = setInterval(checkBufferTime,100, stream\_ns);  
function checkBufferTime(my\_ns:NetStream):Void {  
var bufferPct:Number = Math.min(Math.round(my\_ns.bufferLength/my\_ns.bufferTime\*100), 100);  
var output\_str:String = “\<textformat tabStops=’[100,200]’\>”;  
output\_str += “Buffering “+bufferPct+”%”;  
output\_str += “\</textformat\>”;  
buffer\_txt.htmlText = output\_str;  
}[/COLOR]  
[/COLOR]  
and it works well, but what i want is to do some action when the movie ends. somebody have the code to do that?

thanx for your help!, and excuse my english im from argentina we speak spanish here
