Skip to main content
Known Participant
December 23, 2013
Answered

Load a flv file from the net.How?

  • December 23, 2013
  • 1 reply
  • 5554 views

Hi!

I need to create a video player that will load the FLV file from the net.Can Anyone please give me an example of how do I do it?

I've tried a lot of codes but none of them worked for me.

This topic has been closed for replies.
Correct answer kglad

use your flv's url to assign the source of your flvplayback component or add to the play method of your netstream class.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 23, 2013

use your flv's url to assign the source of your flvplayback component or add to the play method of your netstream class.

TavaresEdAuthor
Known Participant
December 24, 2013

Hi!

This is the code I am using but it is returning an error message saying " Error opening URL 'http://www.djchambinho.com/Videos/PrimeiraQuinta.flv' NetStream.Play.StreamNotFound

var video:Video = new Video(320, 240);

addChild(video);

var nc:NetConnection = new NetConnection();

nc.connect(null);

var ns:NetStream = new NetStream(nc);

ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);

function onStatusEvent(stat:Object):void

{

          trace(stat.info.code);

}

var meta:Object = new Object();

meta.onMetaData = function(meta:Object)

{

          trace(meta.duration);

}

ns.client = meta;

video.attachNetStream(ns);

ns.play("http://www.djchambinho.com/Videos/PrimeiraQuinta.flv");

thank you

kglad
Community Expert
Community Expert
December 24, 2013

your url is incorrect.