# Access netStream from inside a loop

**URL:** <https://forum.kirupa.com/t/access-netstream-from-inside-a-loop/295921>\
**Category:** Uncategorized\
**Created:** [September 7, 2009, 2:14pm UTC](https://forum.kirupa.com/t/access-netstream-from-inside-a-loop/295921 "2009-09-07T14:14:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twelve20](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@twelve20](https://forum.kirupa.com/u/twelve20)\
**Post date:** [September 7, 2009, 2:14pm UTC](https://forum.kirupa.com/t/access-netstream-from-inside-a-loop/295921/1 "2009-09-07T14:14:38Z")

</div>

I have three movieclips i would like to play one after another.

I have them loaded into the flash using bulkloader but i can’t access netStream for any of the loaded videos.

Is this possible and what am i doing wrong?

This is my working code so far:

any help would be great

```php

private function videosLoaded(evt:Event):void {
			
	trace('all videos loaded');
			
	for (var i = 0; i < 3; i++) {
				
	movieHolder = new movieHolder_mc();
	movieHolder.name = i;
	movieHolder.x = i*512;
	var file: Video = new Video();
	file.width = 512;
	file.height = 286;
	// get the nestream from the bulkloader:
	var theNetStream: NetStream = videoLoader.getNetStream("video_"+i);
        //disabled this to stop the movies from playing but need to access this from outside the loop.
        //theNetStream.resume();
	file.attachNetStream(theNetStream);
	theNetStream.resume();
				
	movieHolder.addChild(file);
	addChild(movieHolder)
	}
			
			
        // doesn't seem to want to work
	getChildAt(0).resume();
}

```
