PDA

View Full Version : Error #2044 #2095 og #1069 on loading .flv-file


felisan
03-12-2008, 10:14 AM
hej everybody.


I've tried loading a .flv-file into my Flash, and it actually works properly.

I use the following actionscript:

var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
var video:Video = new Video(700, 480);
addChild(video);
video.attachNetStream(videoStream);
videoStream.play("shine_introduction.flv");

and when I test, the .flv is loaded and all is honky Dory.
except...

I get the following error in my trace-window:
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=ReferenceError: Error #1069: Property onMetaData not found on flash.net.NetStream and there is no default value.
at loading_flv_files_fla::MainTimeline/frame1()


how do I avoid these errors, and how much do they actually matter?

an example of flash loading the .flv-file can be seen here
http://felisan.wordpress.com/2008/01/23/as30-brug-af-after-effects-flv-filer-i-flash-del-1/

thanks
felisan

straydog
03-12-2008, 12:23 PM
To be honest I don't know why its throwing those errors, unless you have other code in your swf. Try looking at these, they might help.

onMetaData (http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002562.html)

AsyncErrorEvent (http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/AsyncErrorEvent.html)

if nothing else works try rewriting your code in a new fla

wvxvw
03-12-2008, 03:32 PM
AsyncErrorEvent is a notification for any error that happened during recieving the stream.
One of the errors that happened was that you have not provided the stream with onMetaData handler. There are few more errors of this kind you may run into: no onStatus handler, no onPlayStatus handler. There are 2 more events that are being called on the client recieving the video (you need them to test the bendwidth, just forgot the names %). I'll edit this when I'm home =)

rwt
02-14-2010, 06:47 PM
ah, but you need to create both onMetaData and Async listeners and callbacks. It is not a compiler error though, so you needn't worry too much about them.