views:

419

answers:

3

Hi

I have a c# form where i want to display a youtube movie. I have placed a shockwave flash object where i can load a youtube movie.

axShockwaveFlash.LoadMovie(0, "http://www.youtube.com/v/tVP0b8qvZg8&enablejsapi=1&playerapiid=ytplayer");

this works fine. The problem occurs when i through code, want to play/pause/anything with the youtube movie. I can understand that one needs to do a little actionscripting and use the shockwaves callfunction but so far nothing has worked. And im a beginner to Actionscripting and flash.

I hope some of you can come with some help or code examples to how i can control my youtube movies.

Thanks alot in advance

Lars

A: 

There is a great example on embedding flash videos in a C# application. I suggest you follow the article and forward parameters to the video player - the commands for Youtube API are available in the Google Code section.

fixed
A: 

This offers you a good detail tutorial on using the YouTube API and the Chormeless player so you can control the movie on your own. I have a demo too if you need it, but this should be enough to get you going, let me know if you need more help :)

Tutorial: http://www.perkstoveland.com/archives/40

joseeight
A: 

If you just want a Youtube video on your website, you just need to embed it.

eg:

<object width="400" height="300">
   <param name="movie" value="http://www.youtube.com/v/2Trszk44ElI&amp;hl=en&amp;fs=1&amp;showinfo=0" />
   <param name="allowFullScreen" value="true" />
   <param name="allowscriptaccess" value="always" />
   <embed src="http://www.youtube.com/v/2Trszk44ElI&amp;hl=en&amp;fs=1&amp;showinfo=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="300"></embed>
</object>

Or, you can use JW Player, which is a free video player (for personal use only) build in actionscript 3. http://www.longtailvideo.com/players/jw-flv-player/

David