# How to implement Video Streaming in Flash CS3

**URL:** <https://forum.kirupa.com/t/how-to-implement-video-streaming-in-flash-cs3/303685>\
**Category:** flash\
**Created:** [January 25, 2010, 7:01am UTC](https://forum.kirupa.com/t/how-to-implement-video-streaming-in-flash-cs3/303685 "2010-01-25T07:01:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajesh\_flash](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rajesh\_flash](https://forum.kirupa.com/u/rajesh_flash)\
**Post date:** [January 25, 2010, 7:01am UTC](https://forum.kirupa.com/t/how-to-implement-video-streaming-in-flash-cs3/303685/1 "2010-01-25T07:01:32Z")

</div>

Hello Friends,

I need a small help on developing Video Streaming in flash cs3.

I am loading an video(flv) file and controlling the video using Play/Pause/Stop…everything is working fine. Now i want to implement streaming for this video. I am not using FLVPLAYBACK Component.

How to do this using flash cs3 ??? Except the streaming part i done everything.

Here’s the code i am using :

var nc:NetConnection = new NetConnection();  
nc.connect(null);  
var ns:NetStream = new NetStream(nc);  
ns.addEventListener(AsyncErrorEvent.ASYNC\_ERROR, asyncErrorHandler);  
ns.play(“Ed CNBC 1-08.flv”);  
function asyncErrorHandler(event:AsyncErrorEvent):void  
{  
// ignore error  
}  
var vid:Video = new Video();  
vid.attachNetStream(ns);  
addChild(vid);  
pauseBtn.addEventListener(MouseEvent.CLICK, pauseHandler);  
playBtn.addEventListener(MouseEvent.CLICK, playHandler);  
stopBtn.addEventListener(MouseEvent.CLICK, stopHandler);  
togglePauseBtn.addEventListener(MouseEvent.CLICK, togglePauseHandler);  
function pauseHandler(event:MouseEvent):void  
{  
ns.pause();  
}  
function playHandler(event:MouseEvent):void  
{  
ns.resume();  
}  
function stopHandler(event:MouseEvent):void  
{  
ns.pause();  
ns.seek(0);  
}  
function togglePauseHandler(event:MouseEvent):void  
{  
ns.togglePause();  
}

your help will be appreciated.

Regards,  
Rajesh
