<?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"
	>
<channel>
	<title>Comments on: AS3: Loading External Images</title>
	<atom:link href="http://manfred.dschini.org/2007/06/12/as3-loading-external-images/feed/" rel="self" type="application/rss+xml" />
	<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/</link>
	<description></description>
	<pubDate>Wed, 20 Aug 2008 21:38:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: SohbeT</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35654</link>
		<dc:creator>SohbeT</dc:creator>
		<pubDate>Tue, 19 Aug 2008 18:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35654</guid>
		<description>Thanks Good Admin</description>
		<content:encoded><![CDATA[<p>Thanks Good Admin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirvanax</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35652</link>
		<dc:creator>Nirvanax</dc:creator>
		<pubDate>Tue, 19 Aug 2008 17:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35652</guid>
		<description>thanks for codes johnny
my web : http://www.rocksijen.com</description>
		<content:encoded><![CDATA[<p>thanks for codes johnny<br />
my web : <a href="http://www.rocksijen.com" rel="nofollow">http://www.rocksijen.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cem cemilay</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35648</link>
		<dc:creator>cem cemilay</dc:creator>
		<pubDate>Tue, 19 Aug 2008 14:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35648</guid>
		<description>thanks for new codes Johhny, i will try...</description>
		<content:encoded><![CDATA[<p>thanks for new codes Johhny, i will try&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnny</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35647</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Tue, 19 Aug 2008 14:17:40 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35647</guid>
		<description>Here the same code, just a little more portable &#38; flexible:

import flash.display.MovieClip;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.*;


var loader:Loader;
var paramImage:String;
var thumbnail:MovieClip;

// Fake Constructor
function init():void  {
	loader = new Loader();
	thumbnail = new MovieClip();
	this.addChild(thumbnail);
}

	
function load(url:String):void  {
	loader.load(new URLRequest(url));
	loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
	loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR , onLoadError);
	loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
}


// Event Handlers

function onLoadComplete(event:Event):void {
	thumbnail.addChild(this.loader);
}


function onLoadError(e:Event):void  {
	trace(this+".ERROR loading "+paramImage);
}

function onLoadProgress(e:Event):void  {
	// Needed for progressbar
}


init();
load("http://somewebsite.com/image.png");</description>
		<content:encoded><![CDATA[<p>Here the same code, just a little more portable &amp; flexible:</p>
<p>import flash.display.MovieClip;<br />
import flash.display.Loader;<br />
import flash.net.URLRequest;<br />
import flash.events.*;</p>
<p>var loader:Loader;<br />
var paramImage:String;<br />
var thumbnail:MovieClip;</p>
<p>// Fake Constructor<br />
function init():void  {<br />
	loader = new Loader();<br />
	thumbnail = new MovieClip();<br />
	this.addChild(thumbnail);<br />
}</p>
<p>function load(url:String):void  {<br />
	loader.load(new URLRequest(url));<br />
	loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);<br />
	loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR , onLoadError);<br />
	loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);<br />
}</p>
<p>// Event Handlers</p>
<p>function onLoadComplete(event:Event):void {<br />
	thumbnail.addChild(this.loader);<br />
}</p>
<p>function onLoadError(e:Event):void  {<br />
	trace(this+&#8221;.ERROR loading &#8220;+paramImage);<br />
}</p>
<p>function onLoadProgress(e:Event):void  {<br />
	// Needed for progressbar<br />
}</p>
<p>init();<br />
load(&#8221;http://somewebsite.com/image.png&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manfred Weber</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35529</link>
		<dc:creator>Manfred Weber</dc:creator>
		<pubDate>Thu, 14 Aug 2008 11:37:24 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35529</guid>
		<description>Hello FLCoder, yeah this is outdated a little bit - but still AS3 [an early version]. However I think URLRequest is the right way to go.</description>
		<content:encoded><![CDATA[<p>Hello FLCoder, yeah this is outdated a little bit - but still AS3 [an early version]. However I think URLRequest is the right way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FLCoder</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35528</link>
		<dc:creator>FLCoder</dc:creator>
		<pubDate>Thu, 14 Aug 2008 11:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-35528</guid>
		<description>I get a compile error as Loader.load() is expecting a flash.net.URLRequest instead of a String.  Are you sure this is the AS3 way to do it or is this the AS2 way?  I'm not really up to date on flash and I want to try and learn best practices for AS3 and leave behind old AS1/2 ways of doing things.</description>
		<content:encoded><![CDATA[<p>I get a compile error as Loader.load() is expecting a flash.net.URLRequest instead of a String.  Are you sure this is the AS3 way to do it or is this the AS2 way?  I&#8217;m not really up to date on flash and I want to try and learn best practices for AS3 and leave behind old AS1/2 ways of doing things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikenaman</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-34844</link>
		<dc:creator>mikenaman</dc:creator>
		<pubDate>Tue, 15 Jul 2008 10:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-34844</guid>
		<description>Hi guys

I've been looking into loading an image into a BitmapData object and you can achive the above using the following...

sourceBMD = e.target.loader.contentLoaderInfo.content.bitmapData as BitmapData;

"e" is the Event object passed through when Event.COMPLETE fires.

Hope this helps!

Thanks,
Mike</description>
		<content:encoded><![CDATA[<p>Hi guys</p>
<p>I&#8217;ve been looking into loading an image into a BitmapData object and you can achive the above using the following&#8230;</p>
<p>sourceBMD = e.target.loader.contentLoaderInfo.content.bitmapData as BitmapData;</p>
<p>&#8220;e&#8221; is the Event object passed through when Event.COMPLETE fires.</p>
<p>Hope this helps!</p>
<p>Thanks,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephen2earth</title>
		<link>http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-32639</link>
		<dc:creator>stephen2earth</dc:creator>
		<pubDate>Mon, 02 Jun 2008 01:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://manfred.dschini.org/2007/06/12/as3-loading-external-images/#comment-32639</guid>
		<description>No worries.
Yeah, you're right about that...I do tend to use INIT most of the time for flexibility in loading .swf files, so I suppose I am just prejudiced. :)
Cheers,
Stephen</description>
		<content:encoded><![CDATA[<p>No worries.<br />
Yeah, you&#8217;re right about that&#8230;I do tend to use INIT most of the time for flexibility in loading .swf files, so I suppose I am just prejudiced. :)<br />
Cheers,<br />
Stephen</p>
]]></content:encoded>
	</item>
</channel>
</rss>
