<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reflexiones y notas sobre el mundo de los servicios IT enfocados a soluciones de negocio. Reseñas sobre la elaboración de sistemas de información,valoración de frameworks, programación y opiniones sobre herramientas de desarrollo de aplicaciones &#187; loader</title>
	<atom:link href="http://www.esviable.es/tag/loader/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.esviable.es</link>
	<description>Reflexiones y notas sobre el mundo de los servicios IT enfocados a soluciones de negocio. Reseñas sobre la elaboración de sistemas de información,valoración de frameworks, programación y opiniones sobre herramientas de desarrollo de aplicaciones</description>
	<lastBuildDate>Sat, 22 May 2010 04:28:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Load External Image with As3</title>
		<link>http://www.esviable.es/2009/11/15/load-external-image-with-as3/</link>
		<comments>http://www.esviable.es/2009/11/15/load-external-image-with-as3/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 18:03:12 +0000</pubDate>
		<dc:creator>Efren</dc:creator>
				<category><![CDATA[As3 Flash]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[loader]]></category>
		<category><![CDATA[Programacion]]></category>

		<guid isPermaLink="false">http://www.esviable.es/?p=50</guid>
		<description><![CDATA[Hace tiempo me llamó mucho la atención la cantidad de blogs que tenían algún post con información sobre como cargar una imagen con as3, y algo común en todos que era el mismo error.
Si alguien quería copiar y pegar el código asociado en su función se iba a encontrar con un error sin aparente motivo.
El [...]]]></description>
			<content:encoded><![CDATA[<p>Hace tiempo me llamó mucho la atención la cantidad de blogs que tenían algún post con información sobre como cargar una imagen con as3, y algo común en todos que era el mismo error.</p>
<p>Si alguien quería copiar y pegar el código asociado en su función se iba a encontrar con un error sin aparente motivo.</p>
<p>El código que se puede encontrar es algo así:</p>
<ol>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #0066cc;">this</span>.<span style="color: #006600;">loader</span> = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #0066cc;">this</span>.<span style="color: #006600;">loader</span>.<span style="color: #006600;">load</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">&#8220;http://somewebsite.com/image.png&#8221;</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #0066cc;">this</span>.<span style="color: #006600;">loader</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">(</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #0066cc;">onLoadComplete</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li style="font-weight: bold;"></li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #0066cc;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066cc;">onLoadComplete</span><span style="color: #66cc66;">(</span>event:Event<span style="color: #66cc66;">)</span>:<span style="color: #0066cc;">void</span> <span style="color: #66cc66;">{</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> thumbnail:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li>
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">thumbnail.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">(</span><span style="color: #0066cc;">this</span>.<span style="color: #006600;">loader</span><span style="color: #66cc66;">)</span>;</div>
</li>
<li></li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div>
</li>
</ol>
<p>Y esto no va a funcionar ya que no es correcto asignar un listener de evento directamente al objeto Loader<br />
Lo que hay que hacer es asignarlo a la propiedad contentLoaderInfo del Loader para hacerlo funcionar correctamente <img src='http://www.esviable.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre name="code" class="c#">
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.esviable.es/2009/11/15/load-external-image-with-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

