How to Load flash file in memory From Web server ?

.NET Edition of the F-IN-BOX
oneinus
Posts: 1
Joined: Fri Apr 07, 2006 1:41 am

How to Load flash file in memory From Web server ?

Postby oneinus » Fri Apr 07, 2006 1:44 am

Below code Does Not Works.. (C#)

string flashUrl = "http://www.zeum.co.kr/test.swf"

this.flashPlayerControl1.PutMovieFromStream(this.GetType().Assembly.GetManifestResourceStream(flashUrl));

this.flashPlayerControl1.FlashMethod_Play();

I want to Know How to Load flash file in memory From Web server ?

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri Apr 07, 2006 8:32 am

Thank you for your question.

This code doesn't work because this.GetType().Assembly.GetManifestResourceStream(flashUrl) returns null, your application doesn't contain resource with name flashUrl = "http://www.zeum.co.kr/test.swf".
The right code is:

Code: Select all

string flashUrl = "http://www.zeum.co.kr/test.swf";

WebClient myClient = new WebClient();
Stream response = myClient.OpenRead(flashUrl);

this.flashPlayerControl1.PutMovieFromStream(response);

this.flashPlayerControl1.FlashMethod_Play();

response.Close();


The class WebRequest is in the System.Net namespace.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 5 guests