Hey all!

I'm trying to write a flexible video player that will get the video width & height from the file, and build the player around those dimensions. So I've got an onMetaData event that collects the width and height and reports them to the code. However, this metadata event takes a second or two to happen.

So what I want to do is write an equation that will wait until the metadata is loaded, then build my player. However, when my metadata equation is doing anything other than simply defining variables, it always throws a 2095 error.

For example, this will work:

Code:
private function nsMetaDataCallback(mData:Object):void {
			if (metaDataLoaded==0) {
				metaDataLoaded+=1;
				videoHeight=mData.height;
				videoWidth=mData.width;
				videoLength=mData.duration;
but if I throw in an equation like buildVideoPlayer(), it all fails, and I get a 2095 unhandled onMetadata Event error.

This is driving me crazy!