# Video object - call to load and listener object not working!

**URL:** <https://forum.kirupa.com/t/video-object-call-to-load-and-listener-object-not-working/223804>\
**Category:** Uncategorized\
**Created:** [April 25, 2007, 10:47pm UTC](https://forum.kirupa.com/t/video-object-call-to-load-and-listener-object-not-working/223804 "2007-04-25T22:47:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![natronp](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@natronp](https://forum.kirupa.com/u/natronp)\
**Post date:** [April 25, 2007, 10:47pm UTC](https://forum.kirupa.com/t/video-object-call-to-load-and-listener-object-not-working/223804/1 "2007-04-25T22:47:29Z")

</div>

i’ve got a video object within a movieclip who’s full path i put in a var called ‘video’. here’s my code, it appears that the video object is not loading my stream and/or i’m not getting the listener object to work properly… everything does trace out good as far as vars, rtmp address, etc… grrr!!!

```auto
 //function to load the stream in the vid object
_global.loadVid=function(vidFile){
	trace("this is path to vidObj: "+video);
	trace("loadVid function var passed: "+vidFile);
	var listenerObject:Object = new Object();
	listenerObject.ready=function(eventObject:Object):Void{
		//video loaded, do this
		video.removeEventListener("ready", listenerObject);
		_root.container.vidPanel.gotoAndPlay("tovideo");
		trace("video is loaded, proceeding to video play state");
	};
	video.addEventListener("ready", listenerObject);
	var nV:String=rtmpURL+vidFile;
	video.load(nV, true);
	trace("video: "+rtmpURL+vidFile+" should be loading");
 }
 

```
