# Need help with Streaming videos in AS2.0

**URL:** <https://forum.kirupa.com/t/need-help-with-streaming-videos-in-as2-0/297633>\
**Category:** Uncategorized\
**Created:** [October 6, 2009, 9:40am UTC](https://forum.kirupa.com/t/need-help-with-streaming-videos-in-as2-0/297633 "2009-10-06T09:40:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![qhrome27](https://avatars.discourse-cdn.com/v4/letter/q/f04885/32.png) [@qhrome27](https://forum.kirupa.com/u/qhrome27)\
**Post date:** [October 6, 2009, 9:40am UTC](https://forum.kirupa.com/t/need-help-with-streaming-videos-in-as2-0/297633/1 "2009-10-06T09:40:33Z")

</div>

Hello,

I have been trying to implement some streaming for my FLV videos using a CDN (content delivery network). However, there is little information on the internet about dynamic streaming in AS2.0

This is how i initiated the object:

```
obj = new Object();
obj.oldStreamName = null;
obj.streamName = newVidFile700kbps;
obj.start = 0;
//obj.length = -1;
obj.transition = "switch";
currentStream = obj.streamName;

myNetStream.play2(obj);

```

The idea is to replace the video with a lower or higher quality version based on the user’s bandwidth at the time.

I use this code to switch to the different bitrate FLV files:

```
obj.oldStreamName = currentStream;
obj.streamName = newVidFile300kbps;
obj.start = myNetStream.time;
prevTime = _root.myNetStream.time;
//obj.length = -1;
obj.transition = "switch";
currentStream = obj.streamName;
myNetStream.play2(obj);

```

This is supposed to make the new video seamlessly retain the play position of the one it is replacing.  
However, when I run it, the videos always start at 0 seconds, ruining the seamless swap that should be happening.

I have been referencing this article about it, which seems to be the only article on the internet about streaming for AS2.0. (not so helpful)

[http://www.adobe.com/devnet/flashmediaserver/articles/dynstream\_actionscript.html](http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_actionscript.html)

Any help would be greatly appreciated.
