<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Loading / unloading youtube videos in flash</title>
	<atom:link href="http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/</link>
	<description>WEB 2.0 / RIAs Expert.</description>
	<lastBuildDate>Tue, 05 May 2009 14:33:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Iwanttobuttin</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-25</link>
		<dc:creator>Iwanttobuttin</dc:creator>
		<pubDate>Wed, 01 Apr 2009 23:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-25</guid>
		<description>Tks for de help.</description>
		<content:encoded><![CDATA[<p>Tks for de help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jawad Khan</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-15</link>
		<dc:creator>Jawad Khan</dc:creator>
		<pubDate>Sat, 21 Feb 2009 18:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-15</guid>
		<description>Sorry guys, I have been away from my blog for quite a long time.. Now am back….. Thanks everyone for posting comments..
@nate
Actually the way I suggested does the trick to use youtube videos in your flash movies. removeMovieClip() or unloadclip functions doesnot have any effect over youtube video container. Its just a hint that how easily youtube API functions become available to you.
@Sajil and @Loydster
you should use: System.security.allowDomain(”http://www.youtube.com”);
cz we have to use youtube player’s functions.. so since both swfs are in different domains, i mean your swf at your domain.com and youtube player at youtube.com.. so allowDomain is required to access other swf’s variables and functions.
@gente21: man, i cannot promise.. but i would love to do so, if i get sometime during next few days.
@Dan and @John:
Great!.. its my pleasure..</description>
		<content:encoded><![CDATA[<p>Sorry guys, I have been away from my blog for quite a long time.. Now am back….. Thanks everyone for posting comments..<br />
@nate<br />
Actually the way I suggested does the trick to use youtube videos in your flash movies. removeMovieClip() or unloadclip functions doesnot have any effect over youtube video container. Its just a hint that how easily youtube API functions become available to you.<br />
@Sajil and @Loydster<br />
you should use: System.security.allowDomain(”http://www.youtube.com”);<br />
cz we have to use youtube player’s functions.. so since both swfs are in different domains, i mean your swf at your domain.com and youtube player at youtube.com.. so allowDomain is required to access other swf’s variables and functions.<br />
@gente21: man, i cannot promise.. but i would love to do so, if i get sometime during next few days.<br />
@Dan and @John:<br />
Great!.. its my pleasure..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-14</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 20 Feb 2009 12:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-14</guid>
		<description>Thank you for this - been tearing my hair out for days! Worked a treat :)</description>
		<content:encoded><![CDATA[<p>Thank you for this &#8211; been tearing my hair out for days! Worked a treat <img src='http://jawad.pk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gente21</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-13</link>
		<dc:creator>gente21</dc:creator>
		<pubDate>Thu, 12 Feb 2009 17:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-13</guid>
		<description>Hello, if you have the time, could you please post the full srcipt for loading youtube onto as3? All tutorials I&#039;ve found are really complicated and this one seems pretty simple but I can&#039;t make it work. Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Hello, if you have the time, could you please post the full srcipt for loading youtube onto as3? All tutorials I&#8217;ve found are really complicated and this one seems pretty simple but I can&#8217;t make it work. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-12</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 09 Dec 2008 03:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-12</guid>
		<description>Thanks for the helpful info here.  I was pretty stumped when I found out I was unable to remove or unload the Youtube video, although I was able to modify the x and y position of the movieClip with Actionscript.

Using stopVideo() worked so at least I understand how the control the Youtube video better.

John</description>
		<content:encoded><![CDATA[<p>Thanks for the helpful info here.  I was pretty stumped when I found out I was unable to remove or unload the Youtube video, although I was able to modify the x and y position of the movieClip with Actionscript.</p>
<p>Using stopVideo() worked so at least I understand how the control the Youtube video better.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sajil</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-8</link>
		<dc:creator>sajil</dc:creator>
		<pubDate>Mon, 03 Nov 2008 09:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-8</guid>
		<description>not working........its stops in first frame..i get the following error mesage in flash ide output panel...

SecurityDomain &#039;http://s.ytimg.com/yt/swf/cps-vfl62057.swf&#039; tried to access incompatible context &#039;http://www.youtube.com/swf/l.swf?swf=http%3A//s.ytimg.com/yt/swf/cps-vfl62057.swf&amp;video_id=_PnWw6m3McQ&amp;rel=1&amp;showsearch=1&amp;eurl=http%3A//www.youtube.com/v/_PnWw6m3McQ&amp;iurl=http%3A//i4.ytimg.com/vi/_PnWw6m3McQ/hqdefault.jpg&amp;sk=mkpn9P_SnQyp0yRjAo1yKy3p68yFx1OiC&amp;use_get_video_info=1&amp;load_modules=1&amp;hqt=1&#039;
*** Security Sandbox Violation ***
Connection to null halted - not permitted from http://s.ytimg.com/yt/swf/cps-vfl62057.swf
-- Remote SWFs may not access local files.
*** Security Sandbox Violation ***
Connection to null halted - not permitted from http://s.ytimg.com/yt/swf/cps-vfl62057.swf
-- Remote SWFs may not access local files.</description>
		<content:encoded><![CDATA[<p>not working&#8230;&#8230;..its stops in first frame..i get the following error mesage in flash ide output panel&#8230;</p>
<p>SecurityDomain &#8216;<a href="http://s.ytimg.com/yt/swf/cps-vfl62057.swf" rel="nofollow">http://s.ytimg.com/yt/swf/cps-vfl62057.swf</a>&#8216; tried to access incompatible context &#8216;<a href="http://www.youtube.com/swf/l.swf?swf=http%3A//s.ytimg.com/yt/swf/cps-vfl62057.swf&#038;video_id=_PnWw6m3McQ&#038;rel=1&#038;showsearch=1&#038;eurl=http%3A//www.youtube.com/v/_PnWw6m3McQ&#038;iurl=http%3A//i4.ytimg.com/vi/_PnWw6m3McQ/hqdefault.jpg&#038;sk=mkpn9P_SnQyp0yRjAo1yKy3p68yFx1OiC&#038;use_get_video_info=1&#038;load_modules=1&#038;hqt=1" rel="nofollow">http://www.youtube.com/swf/l.swf?swf=http%3A//s.ytimg.com/yt/swf/cps-vfl62057.swf&#038;video_id=_PnWw6m3McQ&#038;rel=1&#038;showsearch=1&#038;eurl=http%3A//www.youtube.com/v/_PnWw6m3McQ&#038;iurl=http%3A//i4.ytimg.com/vi/_PnWw6m3McQ/hqdefault.jpg&#038;sk=mkpn9P_SnQyp0yRjAo1yKy3p68yFx1OiC&#038;use_get_video_info=1&#038;load_modules=1&#038;hqt=1</a>&#8216;<br />
*** Security Sandbox Violation ***<br />
Connection to null halted &#8211; not permitted from <a href="http://s.ytimg.com/yt/swf/cps-vfl62057.swf" rel="nofollow">http://s.ytimg.com/yt/swf/cps-vfl62057.swf</a><br />
&#8211; Remote SWFs may not access local files.<br />
*** Security Sandbox Violation ***<br />
Connection to null halted &#8211; not permitted from <a href="http://s.ytimg.com/yt/swf/cps-vfl62057.swf" rel="nofollow">http://s.ytimg.com/yt/swf/cps-vfl62057.swf</a><br />
&#8211; Remote SWFs may not access local files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks about Loading</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-10</link>
		<dc:creator>Bookmarks about Loading</dc:creator>
		<pubDate>Fri, 17 Oct 2008 11:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-10</guid>
		<description>[...] - bookmarked by 1 members originally found by firsttiger on 2008-09-25  Loading / unloading youtube videos in flash  http://itsjawad.wordpress.com/2008/07/09/loading-unloading-youtube-videos-in-flash/ - bookmarked [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; bookmarked by 1 members originally found by firsttiger on 2008-09-25  Loading / unloading youtube videos in flash  <a href="http://itsjawad.wordpress.com/2008/07/09/loading-unloading-youtube-videos-in-flash/" rel="nofollow">http://itsjawad.wordpress.com/2008/07/09/loading-unloading-youtube-videos-in-flash/</a> &#8211; bookmarked [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loydster</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-11</link>
		<dc:creator>Loydster</dc:creator>
		<pubDate>Mon, 06 Oct 2008 17:16:31 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-11</guid>
		<description>I am trying to build a Flash website for my nephew at the above location. If you look at main page, the small photos link to larger photos using a carousel (you can also go to the &quot;ASAVIDS&quot; link at the top. What I&#039;m trying to do is set up the large photos as playable videos from Youtube, rather than as links TO videos on YouTube. Any suggestions? I&#039;ve tried several workarounds, but even when I get a video to load in the Flash, I get a &quot;sandbox violation&quot;.</description>
		<content:encoded><![CDATA[<p>I am trying to build a Flash website for my nephew at the above location. If you look at main page, the small photos link to larger photos using a carousel (you can also go to the &#8220;ASAVIDS&#8221; link at the top. What I&#8217;m trying to do is set up the large photos as playable videos from Youtube, rather than as links TO videos on YouTube. Any suggestions? I&#8217;ve tried several workarounds, but even when I get a video to load in the Flash, I get a &#8220;sandbox violation&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nate</title>
		<link>http://jawad.pk/blog/2008/07/09/loading-unloading-youtube-videos-in-flash/comment-page-1/#comment-9</link>
		<dc:creator>nate</dc:creator>
		<pubDate>Wed, 06 Aug 2008 17:35:46 +0000</pubDate>
		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=7#comment-9</guid>
		<description>Doesn&#039;t actually unload the MovieClip, though. This is has the same problem as everything else we&#039;ve tried.

BUTTON ONE or BUTTON TWO will load no problem. But, that&#039;s not the problem we&#039;re trying to solve. UNLOADING either movie once it&#039;s loaded is impossible, even with your new code provided above.

Test it yourself:

// MAIN MOVIE:
var video_mcl:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip(&quot;container&quot;,this.getNextHighestDepth());
var mclListener:Object = new Object();
video_mcl.addListener(mclListener);
mclListener.onLoadInit = function(target_mc:MovieClip) {
	target_mc._xscale = 78.5;
	target_mc._yscale = 78.5;


// BUTTON ONE:
on (press) {
container.stopVideo();
utube_id = &quot;nhwu0hO0hnY&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18&amp;enablejsapi=1&quot;;
full_address = &quot;http://www.youtube.com/v/&quot; + utube_id;
video_mcl.loadClip(full_address, container);
}

// BUTTON TWO:
on (press) {
container.stopVideo();
container.removeMovieClip()
utube_id = &quot;gw40iv6C35c&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18&amp;enablejsapi=1&quot;;
full_address = &quot;http://www.youtube.com/v/&quot; + utube_id;
video_mcl.loadClip(full_address, container);
}</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t actually unload the MovieClip, though. This is has the same problem as everything else we&#8217;ve tried.</p>
<p>BUTTON ONE or BUTTON TWO will load no problem. But, that&#8217;s not the problem we&#8217;re trying to solve. UNLOADING either movie once it&#8217;s loaded is impossible, even with your new code provided above.</p>
<p>Test it yourself:</p>
<p>// MAIN MOVIE:<br />
var video_mcl:MovieClipLoader = new MovieClipLoader();<br />
this.createEmptyMovieClip(&#8220;container&#8221;,this.getNextHighestDepth());<br />
var mclListener:Object = new Object();<br />
video_mcl.addListener(mclListener);<br />
mclListener.onLoadInit = function(target_mc:MovieClip) {<br />
	target_mc._xscale = 78.5;<br />
	target_mc._yscale = 78.5;</p>
<p>// BUTTON ONE:<br />
on (press) {<br />
container.stopVideo();<br />
utube_id = &#8220;nhwu0hO0hnY&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18&amp;enablejsapi=1&#8243;;<br />
full_address = &#8220;http://www.youtube.com/v/&#8221; + utube_id;<br />
video_mcl.loadClip(full_address, container);<br />
}</p>
<p>// BUTTON TWO:<br />
on (press) {<br />
container.stopVideo();<br />
container.removeMovieClip()<br />
utube_id = &#8220;gw40iv6C35c&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18&amp;enablejsapi=1&#8243;;<br />
full_address = &#8220;http://www.youtube.com/v/&#8221; + utube_id;<br />
video_mcl.loadClip(full_address, container);<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

