PDA

View Full Version : Youtube Videos Inside Flash



gringos
June 11th, 2008, 11:25 PM
I need to embed simply the Youtube video inside a flash project. I have found a lot of code around the internet, none that is younger than early 2007 and none if it works now.

this.createEmptyMovieClip("video_mc", 10000);
this.video_mc.loadMovie("http://www.youtube.com/v/-jW1vWgogLQ");.

This is the simplest code that works for flash files, not movies from Youtube, Funnyordie etc. Is it possible that these sites, or *adobe have disabled this?

Here is the error I get
Error opening URL 'http://www.youtube.com/v/-jW1vWgogLQ'

Thanks,
Matt.

Edit: mistakes

Anogar
June 12th, 2008, 02:10 AM
Well, that's not the URL of a SWF, it's the URL of an HTML page, so that certainly isn't going to work.

Check this out for some insight: http://www.lostinactionscript.com/blog/index.php/2007/10/13/flash-you-tube-api/

skyp
June 12th, 2008, 03:56 AM
read this article:

http://otoh.typepad.com/on_the_other_hand/2008/06/embed-the-youtu.html

dail
June 12th, 2008, 06:18 AM
If you are using AS3, there is this api you can interact with; http://code.google.com/support/bin/answer.py?answer=92715&topic=12359