Copy link to clipboard
Copied
Hi all,
I'm having some problems loading a FLV and I've been searching on google for 2 days now and I can't seem to find a anwser for my problem, maybe one of you guys can help me out here.
here is the scenari I have a SWF that loads a FLV
code:
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
var video:Video = new Video();
videoStream.play("myVideo.flv");
video.attachNetStream(videoStream);
video.width = 720;
video.height = 480;
video.x = 0;
video.y = 0;
loaderVid_mc.x = 152;
loaderVid_mc.y = 144;
The problem is everytime I try to load the video I get the following error message:
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onXMPData. error=ReferenceError: Error #1069: Property onXMPData not found on flash.net.NetStream and there is no default value.
at content_fla::MainTimeline/frame1()
Anyone? Any ideas?
Thanks very much for your HELP....I was looking at the help.adobe website you sent me and found a anwser for my problem.
In case anyone comes to the same problem here is what I did for solving it.
I just added the following lines to my code:
original
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
var video:Video = new Video();
videoStream.play("myVideo.flv");
video.attachNetStream(videoStream);
new lines:
v
...Copy link to clipboard
Copied
Basically you need NetStream.client set to an Object, which has onXMPData property that assigned to a function (or null if you don't want to do anything with XMP.) Have a look at the doc:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#client
--
Kenneth Kawamoto
Copy link to clipboard
Copied
Thanks very much for your HELP....I was looking at the help.adobe website you sent me and found a anwser for my problem.
In case anyone comes to the same problem here is what I did for solving it.
I just added the following lines to my code:
original
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
var video:Video = new Video();
videoStream.play("myVideo.flv");
video.attachNetStream(videoStream);
new lines:
var customClient:Object = new Object();
videoStream.client = customClient;