Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

XML driven flv player

Engaged ,
Feb 04, 2008 Feb 04, 2008
Hi,

I need to create an XML driven flv player, now I know how to construct the player, but not sure of the code for the XML to hold just one flv file, not a list of them just the one.

I need my flv player to play just one flv file; as soon as its run on the web, it needs to play only one flv video. No need to pick it from any list etc... This way the client can simply edit the XML file to play a different flv video.

Kind Regards,

Boxing Boom
TOPICS
ActionScript
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Feb 05, 2008 Feb 05, 2008
ok this works for me.

Translate
Engaged ,
Feb 04, 2008 Feb 04, 2008
In this case you can simply use a text file, with the following code. In the file you can simply put the following:

vidLocation=test.flv
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2008 Feb 04, 2008
Hi,

Yeah, but I thought I had to have an XML file? And also, how do I instruct the flv playback for example to play the flv? Would it be like the following:

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
ns.play("vidLocation");

I would prefer to make my own video player, interface and play buttons etc...

Is there a difference in using and .txt file above using a .xml file for this situation?

Thank you for your time and consideration.


Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 04, 2008 Feb 04, 2008
Why not its own analysis of XML? Even if it is in line with the norms can also search out flv filename..
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2008 Feb 04, 2008
Hi,

Sorry, but can you better explain what u mean Weiweiok.

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2008 Feb 04, 2008
Hi All,

Know one know the answer! I am using Flash CS3 and would really need code to work in ActionScript 3 ;)

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2008 Feb 04, 2008
Hi

Come on guys need help here!

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 04, 2008 Feb 04, 2008
Attached is example code to load vid using an xml file and play in FLVPlayback component with instance name of flvPlay.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Hi James,

I am getting the following syntax error:

1093: Syntax error. loader.load(new URLRequest(“content.xml”));

Is this down to URLRequest not working on local machine, does the path have to me on a server?

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2008 Feb 05, 2008
Boxing Boom.

Make sure the xml file is in the same directory as the swf, or else change the URLRequest statement to point it to the directory the xml file is stored in.

Barry.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Hi,
The first error above was caused by "" these guys, the quote marks. With this now fixed, I am getting this error,

Error 1119: flvPlay.source = XML(e.target.data).vidURL.text(); Undefined property source

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2008 Feb 05, 2008
Paste your code as it is now so I can have a look.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Hi Barry,

Please find the code attached:
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 26, 2008 Feb 26, 2008
Boxing Boom,

You are correct about error AS3 Error #1093 being because of the quotes. The unfortunate thing is that this error doesn't give any further info. I have created a blog post specifically about error ActionScript Error #1093 There are a few other reasons that a Flasher will get this error. Hope this is helpful.

Curtis J. Morley
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2008 Feb 05, 2008
what is flvPlay? where are you referencing it?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Hi,

Its the instance name given to the flvPlayback component. Done through library, new video etc....

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2008 Feb 05, 2008
ok this works for me.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Hi Barry,

It doesn't work yet for me? What way have you set up the flvPlayback component?

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Barry,

Can you email me the fla and xml files, just to have a butchers.

Email me on it_trainer1@btinternet.com

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2008 Feb 05, 2008
thats all there is to it. The flvPlayer has an instance name of flvPlay.

make sure the content.xml is in single not double qoutes.

Barry.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 05, 2008 Feb 05, 2008
actually i lie the single / double qoutes doesnt make a difference.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 05, 2008 Feb 05, 2008
Barry,

I must be doing something wrong, can you email me the files, please.

it_trainer1@btinternet.com

Kind Regards,

Boxing Boom
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 16, 2008 Jul 16, 2008
LATEST
See this cool mp3 xml player with visualization, playlist and skins. Fully customisable. Vector. http://flashden.net/item/mp3-xml-strongplayerstrong-with-visualization-and-skins-vectorised/11851
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines