# FLV still choppy after preload

**URL:** <https://forum.kirupa.com/t/flv-still-choppy-after-preload/278681>\
**Category:** flash\
**Created:** [January 3, 2009, 4:11pm UTC](https://forum.kirupa.com/t/flv-still-choppy-after-preload/278681 "2009-01-03T16:11:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tile\_nipper](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@tile\_nipper](https://forum.kirupa.com/u/tile_nipper)\
**Post date:** [January 3, 2009, 4:11pm UTC](https://forum.kirupa.com/t/flv-still-choppy-after-preload/278681/1 "2009-01-03T16:11:47Z")

</div>

All of my flv playback is coming out choppy – pausing about every two seconds. I am preloading the entire file before playing. Can someone look at my code and suggest a solution to get it to play smoothly?

Also, the flv files I am trying to play are 30MB up to 60MB.

[COLOR=“DeepSkyBlue”]stop();

var connection\_nc:NetConnection = new NetConnection();  
connection\_nc.connect(null);  
var stream\_ns:NetStream = new NetStream(connection\_nc);  
my\_video.attachVideo(stream\_ns);  
stream\_ns.play(“video.flv”);

//this pauses the video to wait for the download to complete//  
stream\_ns.onStatus = function(infoObject:Object) {  
if (infoObject.code = “NetStream.Play.Start”) {  
stream\_ns.pause();  
}  
}

this.createTextField(“loaded\_txt”, this.getNextHighestDepth(), 10, 10, 160, 22);  
var loaded\_interval:Number = setInterval(checkBytesLoaded, 500, stream\_ns);  
function checkBytesLoaded(my\_ns:NetStream) {  
var pctLoaded:Number = Math.round(my\_ns.bytesLoaded / my\_ns.bytesTotal \* 100);  
loaded\_txt.text = “Loading Video…” + “(” + pctLoaded + “%)”;  
loaded\_txt.textColor = 0x6699FF;  
progressBar\_mc.bar\_mc.\_xscale = pctLoaded;  
if (pctLoaded \>= 100) {  
//restart the video here//  
stream\_ns.pause();  
loaded\_txt.removeTextField();  
}  
}[/COLOR]
