Aarron Dixon
Aarron Dixon

Reputation: 97

Why isn't my embedded flash player working (c#)?

I'm new to flash player. I think I've nearly figured it out, but it's not working, and I'm at an impasse.

I inserted the object in the form, and I'm using:

string path;
string path = @"http://www.youtube.com/v/aHjpOzsQ9YI";
axShockwaveFlash1.LoadMovie(0, path);
axShockwaveFlash1.Play();

I think I have the Youtube address formatted right... but the flash object does nothing. No error. Just nothing. So there's no debugging it to fix it.

Upvotes: 0

Views: 242

Answers (1)

Derek W
Derek W

Reputation: 10026

Is this what you wanted? Because if it is then you've done everything right. (removed screenshot - no longer relevant to question) Perhaps wait a bit and see if it loads. Obviously AxInterop.ShockwaveFlashObjects.dll is loading properly as you are not getting any null references so the AxShockwaveFlash class is being instantiated properly.

Are you sure you are connected to the internet? If so, is it slow?

Edit per your comment about wanting to autoplay the video:

Simply add ?autoplay=1 to the URL and it plays on load. You actually don't even need the call to Play().

Here is the final code:

string path = @"http://www.youtube.com/v/aHjpOzsQ9YI?autoplay=1";
axShockwaveFlash1.LoadMovie(0, path);

Upvotes: 1

Related Questions