<?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>CODIGO.actionscript &#187; Tutoriales</title>
	<atom:link href="http://www.codigoactionscript.org/category/tutoriales/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codigoactionscript.org</link>
	<description>Blog de programación en ActionScript. Tips, tutoriales, ejemplos de Adobe Flash, Flex y AIR</description>
	<lastBuildDate>Fri, 30 Sep 2011 11:25:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>AdobeTV: Screen density</title>
		<link>http://www.codigoactionscript.org/adobetv-screen-density/</link>
		<comments>http://www.codigoactionscript.org/adobetv-screen-density/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 14:54:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[Videotutorial]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=719</guid>
		<description><![CDATA[<img width="310" height="80" src="http://www.codigoactionscript.org/wp-content/uploads/2010/05/adobetv.jpg" class="attachment-310x85 wp-post-image" alt="adobetv" title="adobetv" /><p>En los dispositivos móviles el DPI (puntos por pulgada) es muy variable. Esto tiene un efecto directo sobre el tamaño de su contenido. En este vídeo vemos como ajustar el tamaño de los gráficos en función del dispositivo.</p>
<p></p>
<p>Related posts:
AdobeTV: Determining [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/adobetv-determining-speed-data-from-gps/' rel='bookmark' title='AdobeTV: Determining speed data from GPS'>AdobeTV: Determining speed data from GPS</a></li>
<li><a href='http://www.codigoactionscript.org/adobetv-air-for-android-development/' rel='bookmark' title='AdobeTV: Air for Android Development'>AdobeTV: Air for Android Development</a></li>
<li><a href='http://www.codigoactionscript.org/adobetv-desarrollo-air-para-android-con-flash-cs5/' rel='bookmark' title='AdobeTV: Desarrollo AIR para Android con Flash CS5'>AdobeTV: Desarrollo AIR para Android con Flash CS5</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En los dispositivos móviles el DPI (puntos por pulgada) es muy variable. Esto tiene un efecto directo sobre el tamaño de su contenido. En este vídeo vemos como ajustar el tamaño de los gráficos en función del dispositivo.</p>
<p><iframe title="AdobeTV Video Player" width="480" height="296" src="http://tv.adobe.com/embed/519/10654/" frameborder="0" allowfullscreen scrolling="no"></iframe></p>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/adobetv-determining-speed-data-from-gps/' rel='bookmark' title='AdobeTV: Determining speed data from GPS'>AdobeTV: Determining speed data from GPS</a></li>
<li><a href='http://www.codigoactionscript.org/adobetv-air-for-android-development/' rel='bookmark' title='AdobeTV: Air for Android Development'>AdobeTV: Air for Android Development</a></li>
<li><a href='http://www.codigoactionscript.org/adobetv-desarrollo-air-para-android-con-flash-cs5/' rel='bookmark' title='AdobeTV: Desarrollo AIR para Android con Flash CS5'>AdobeTV: Desarrollo AIR para Android con Flash CS5</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/adobetv-screen-density/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cómo mostrar subtitulos de forma automática con Adobe Encore</title>
		<link>http://www.codigoactionscript.org/como-mostrar-subtitulos-de-forma-automatica-con-adobe-encore/</link>
		<comments>http://www.codigoactionscript.org/como-mostrar-subtitulos-de-forma-automatica-con-adobe-encore/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 21:26:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[encore]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[cs5]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=667</guid>
		<description><![CDATA[<p>En este segundo Tip sobre Adobe Encore CS5, y siguiendo el =http://www.cristalab.com/tips/cmo-aadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5-c90085ltema anterior sobre los subtítulos[/url], voy a explicar cómo hacer para que un subtitulo aparezca de forma automática al visualizarse un video sin que el usuario tenga que habilitarlo desde el menú.</p>
<p>Imaginemos que tenemos un DVD con un único video grabado en un idioma concreto. Y el DVD dispone de un menú inicial con varios botones, uno en cada idioma para visualizar todos ese mismo video pero que cada uno lo muestre automáticamente con los subtítulos visibles para dicho [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/como-anadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5/' rel='bookmark' title='Cómo añadir subtitulos a videos en DVD con Adobe Encore CS5'>Cómo añadir subtitulos a videos en DVD con Adobe Encore CS5</a></li>
<li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Cómo mostrar tooltips dentro de componentes List de Flex'>Cómo mostrar tooltips dentro de componentes List de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/obtener-elementos-de-un-listado-de-forma-aleatoria-sin-que-se-repitan/' rel='bookmark' title='Obtener elementos de un listado de forma aleatoria sin que se repitan'>Obtener elementos de un listado de forma aleatoria sin que se repitan</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En este segundo <a href="http://www.cristalab.com/tips">Tip</a> sobre <a href="http://www.cristalab.com/tips/tags/encore">Adobe Encore CS5</a>, y siguiendo el <a href="http://www.cristalab.com/tips/cmo-aadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5-c90085l">=http://www.cristalab.com/tips/cmo-aadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5-c90085l</a>tema anterior sobre los subtítulos[/url], voy a explicar cómo hacer para que un subtitulo aparezca de forma automática al visualizarse un video sin que el usuario tenga que habilitarlo desde el menú.</p>
<p>Imaginemos que tenemos un <a href="http://www.cristalab.com/tips/tags/dvd">DVD</a> con un único video grabado en un idioma concreto. Y el DVD dispone de un menú inicial con varios botones, uno en cada idioma para visualizar todos ese mismo video pero que cada uno lo muestre automáticamente con los subtítulos visibles para dicho idioma.</p>
<p>Para hacer esto iremos al menú y seleccionaremos por ejemplo el primer botón que sería para ver el video con subtítulos en inglés. Haremos click en el botón derecho del mouse, y seleccionaremos la opción "<strong><em>Specify Link</em></strong>".</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p08.png" alt="" /></div>
<p>Esto nos mostrará el menú de selección de enlace de video para ese botón de menú. Ahí tendremos la opción de especificar una pista de subtitulo (también de otro audio si fuese el caso) que queremos activar automáticamente al entrar desde ese botón.</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p09.png" alt="" /></div>
<p>Ahora solo tendríamos que asignar al resto de botones el mismo enlace al video pero seleccionando la pista de subtitulo que nos interese.</p>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/como-anadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5/' rel='bookmark' title='Cómo añadir subtitulos a videos en DVD con Adobe Encore CS5'>Cómo añadir subtitulos a videos en DVD con Adobe Encore CS5</a></li>
<li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Cómo mostrar tooltips dentro de componentes List de Flex'>Cómo mostrar tooltips dentro de componentes List de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/obtener-elementos-de-un-listado-de-forma-aleatoria-sin-que-se-repitan/' rel='bookmark' title='Obtener elementos de un listado de forma aleatoria sin que se repitan'>Obtener elementos de un listado de forma aleatoria sin que se repitan</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/como-mostrar-subtitulos-de-forma-automatica-con-adobe-encore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cómo añadir subtitulos a videos en DVD con Adobe Encore CS5</title>
		<link>http://www.codigoactionscript.org/como-anadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5/</link>
		<comments>http://www.codigoactionscript.org/como-anadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 20:57:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[encore]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[cs5]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=664</guid>
		<description><![CDATA[<img width="310" height="80" src="http://www.codigoactionscript.org/wp-content/uploads/2010/08/encore.jpg" class="attachment-310x85 wp-post-image" alt="encore" title="encore" /><p>Cómo hace tiempo que no escribo ningún =http://www.cristalab.com/tipsTip[/url] (y he recibido varias patadas por ello) voy a escribir un par sobre Adobe Encore CS5 dado que estos días ando trabajando en un proyecto con él.</p>
<p>En este caso voy a explicar [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/como-mostrar-subtitulos-de-forma-automatica-con-adobe-encore/' rel='bookmark' title='Cómo mostrar subtitulos de forma automática con Adobe Encore'>Cómo mostrar subtitulos de forma automática con Adobe Encore</a></li>
<li><a href='http://www.codigoactionscript.org/videos-online-de-las-sesiones-del-adobe-max-2009/' rel='bookmark' title='Videos online de las sesiones del Adobe MAX 2009'>Videos online de las sesiones del Adobe MAX 2009</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Cómo hace tiempo que no escribo ningún <a href="http://www.cristalab.com/tips">=http://www.cristalab.com/tips</a>Tip[/url] (y he recibido varias patadas por ello) voy a escribir un par sobre <a href="http://www.cristalab.com/tips/tags/encore">Adobe Encore CS5</a> dado que estos días ando trabajando en un proyecto con él.</p>
<p>En este caso voy a explicar cómo<strong> añadir subtítulos a nuestros vídeos del DVD</strong>.</p>
<p>El primer paso es tener un archivo de texto (<em>.TXT</em>) con los <strong>tiempos de entrada</strong> y <strong>salida</strong> del subtitulo y su <strong>texto</strong>. En mi caso me llegó un archivo <em>excel</em> con la información con lo que tuve que exportarlo a texto y autoformatearlo para dejarlo con el formato adecuado.</p>
<p>El formato del tiempo de entrada y salida debe de ser: <strong><em>hora:minuto:segundo:frame</em></strong> y deben de estar <strong>separadas por un espacio</strong>, tal cómo se ve en la imagen. Por ejemplo, en este caso el primer subtitulo aparecerá en el segundo 30 y desaparecerá en segundo 34 (el último dígito es el frame rate con lo que la numeración irá de 0 a 25)</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p01.png" alt="" /></div>
<p>Después de los tiempos, separados por otro espacio, pondremos el texto a mostrar por el subtitulo (En la imagen he emborronado los textos ya que es una captura de un proyecto real y no me interesa mostrarlo U_U).</p>
<p>Una vez tenemos el archivo de texto con los subtítulos para cada idioma entraremos en <a href="http://www.cristalab.com/tips/tags/encore">Encore</a>.</p>
<p>Desde la <strong>ventana de Timeline</strong> donde visualizamos la pista de video y audio haremos click en el botón derecho del mouse donde apareceré el menú desplegable que nos permitirá añadir una <strong>pista de subtitulo</strong>.</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p02.png" alt="" /></div>
<p>Al crear la pista deberemos seleccionar el idioma del subtitulo que queremos añadir.</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p03.png" alt="" /></div>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p04.png" alt="" /></div>
<p>Ahora, con la pista ya creada volveremos a hacer click en el botón derecho del mouse para añadir los subtítulos a esa pista. Cómo nuestros subtítulos se encuentrar dentro de un archivo .TXT seleccionaremos "<strong><em>Text Script</em></strong>".</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p05.png" alt="" /></div>
<p>Con el archivo de texto seleccionado se nos abrirá una ventana donde especificar las propiedades de formato de los subtítulos. Podremos elegir color, tipo de letra, posición, etc..</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p06.png" alt="" /></div>
<p>Introducidos todos estos formatos, nuestra pista de subtítulos ya estará disponible. A partir de aquí podremos añadir tantas pistas de subtítulos como idiomas disponga nuestro DVD.</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/encore/subtitulos/p07.png" alt="" /></div>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/como-mostrar-subtitulos-de-forma-automatica-con-adobe-encore/' rel='bookmark' title='Cómo mostrar subtitulos de forma automática con Adobe Encore'>Cómo mostrar subtitulos de forma automática con Adobe Encore</a></li>
<li><a href='http://www.codigoactionscript.org/videos-online-de-las-sesiones-del-adobe-max-2009/' rel='bookmark' title='Videos online de las sesiones del Adobe MAX 2009'>Videos online de las sesiones del Adobe MAX 2009</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/como-anadir-subtitulos-a-videos-en-dvd-con-adobe-encore-cs5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursos para Flash Catalyst CS5</title>
		<link>http://www.codigoactionscript.org/recursos-para-flash-catalyst-cs5/</link>
		<comments>http://www.codigoactionscript.org/recursos-para-flash-catalyst-cs5/#comments</comments>
		<pubDate>Thu, 13 May 2010 16:10:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[catalyst]]></category>
		<category><![CDATA[Flash Builder 4]]></category>
		<category><![CDATA[Referencia]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[Videotutorial]]></category>
		<category><![CDATA[adobetv]]></category>
		<category><![CDATA[Recursos]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=625</guid>
		<description><![CDATA[<img width="310" height="80" src="http://www.codigoactionscript.org/wp-content/uploads/2010/05/flashcatalyst.jpg" class="attachment-310x85 wp-post-image" alt="flashcatalyst" title="flashcatalyst" /><p></p>
Entender la diferencia:  diseño visual vs diseño interactivo

Welcome to Flash Catalyst (2:40)

Las mejores  prácticas para trabajar con Flash Catalyst

Adobe Flash Catalyst best practices

Diseñando en Flash Catalyst

Getting started with Adobe Flash Catalyst CS5

<p>Más información sobre  diseño interactivo y [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/adobetv-conectar-un-diseno-de-flash-catalyst-a-una-base-de-datos-con-flash-builder/' rel='bookmark' title='AdobeTV: Conectar un diseño de Flash Catalyst a una Base de datos con Flash Builder'>AdobeTV: Conectar un diseño de Flash Catalyst a una Base de datos con Flash Builder</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-lanza-adobe-labs-ideas-para-flash-catalyst/' rel='bookmark' title='Adobe lanza Adobe Labs Ideas para Flash Catalyst'>Adobe lanza Adobe Labs Ideas para Flash Catalyst</a></li>
<li><a href='http://www.codigoactionscript.org/betas-de-flash-builder-4-y-flash-catalyst-en-adobe-labs/' rel='bookmark' title='Betas de Flash Builder 4 y Flash Catalyst en Adobe Labs'>Betas de Flash Builder 4 y Flash Catalyst en Adobe Labs</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="FlashVars" value="fileID=5856&amp;context=481&amp;embeded=true&amp;environment=production" /><param name="src" value="http://images.tv.adobe.com/swf/player.swf" /><param name="flashvars" value="fileID=5856&amp;context=481&amp;embeded=true&amp;environment=production" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="360" src="http://images.tv.adobe.com/swf/player.swf" flashvars="fileID=5856&amp;context=481&amp;embeded=true&amp;environment=production" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h2>Entender la diferencia:  diseño visual vs diseño interactivo</h2>
<ul>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/welcome-to-flash-catalyst-episode-1/" target="_blank">Welcome to Flash Catalyst</a> (2:40)</li>
</ul>
<h2>Las mejores  prácticas para trabajar con Flash Catalyst</h2>
<ul>
<li><a href="http://www.adobe.com/devnet/devnet/flashcatalyst/articles/flash_catalyst_best_practices.html">Adobe Flash Catalyst best practices</a></li>
</ul>
<h2>Diseñando en Flash Catalyst</h2>
<ul>
<li><a href="http://www.adobe.com/devnet/devnet/flashcatalyst/articles/get_started_with_flash_catalyst.html">Getting started with Adobe Flash Catalyst CS5</a></li>
</ul>
<p>Más información sobre  diseño interactivo y cómo se puede utilizar Flash Catalyst y Creative  Suite 5 para construir sitios Web interactivos y interfaces de aplicaciones de usuario, desde el prototipo de traspaso para un  desarrollador de Flex con Flash Builder:</p>
<ul>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/welcome-to-flash-catalyst-episode-1/" target="_blank">Welcome to Flash Catalyst</a> <span>(2:40)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/create-a-simple-wireframe-episode-2/" target="_blank">Creating a simple wireframe</a> <span>(7:44)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/build-multipage-wireframes-episode-3/" target="_blank">Building multipage wireframes</a> <span>(7:14)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/wireframe-drawing-tools-episode-4/" target="_blank">Using the wireframe drawing tools</a> <span>(14:32)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/design-components-from-wireframe-artwork-episode-5/" target="_blank">Designing components from wireframe artwork</a> <span>(12:33)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/wireframes-come-to-life-with-transitions-episode-6/" target="_blank">Adding motion and flow using transitions</a> <span>(9:54)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/make-iterative-changes-to-your-wireframe-episode-7/" target="_blank">Making iterative changes to your wireframe</a> <span>(7:25)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/build-a-visual-design-for-your-wireframe-episode-8/" target="_blank">Building a visual design  using Creative Suite 5</a> <span>(16:10)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/optimize-and-publish-your-project-episode-9/" target="_blank">Optimizing and publishing your project</a> <span>(6:31)</span></li>
<li><a href="http://tv.adobe.com/watch/flash-catalyst-1-1-with-doug-winnie/partnering-with-a-developer-episode-10/" target="_blank">Partnering with a developer</a> <span>(7:45)</span></li>
</ul>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/adobetv-conectar-un-diseno-de-flash-catalyst-a-una-base-de-datos-con-flash-builder/' rel='bookmark' title='AdobeTV: Conectar un diseño de Flash Catalyst a una Base de datos con Flash Builder'>AdobeTV: Conectar un diseño de Flash Catalyst a una Base de datos con Flash Builder</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-lanza-adobe-labs-ideas-para-flash-catalyst/' rel='bookmark' title='Adobe lanza Adobe Labs Ideas para Flash Catalyst'>Adobe lanza Adobe Labs Ideas para Flash Catalyst</a></li>
<li><a href='http://www.codigoactionscript.org/betas-de-flash-builder-4-y-flash-catalyst-en-adobe-labs/' rel='bookmark' title='Betas de Flash Builder 4 y Flash Catalyst en Adobe Labs'>Betas de Flash Builder 4 y Flash Catalyst en Adobe Labs</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/recursos-para-flash-catalyst-cs5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Videos online de las sesiones del Adobe MAX 2009</title>
		<link>http://www.codigoactionscript.org/videos-online-de-las-sesiones-del-adobe-max-2009/</link>
		<comments>http://www.codigoactionscript.org/videos-online-de-las-sesiones-del-adobe-max-2009/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 11:46:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[eventos]]></category>
		<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[max]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=542</guid>
		<description><![CDATA[<p>Como ya se anunció, para los que no hemos podido asistir en directo a las conferencias del Adobe MAX se han colocado la grabación de las sesiones en la web de Adobe.TV.</p>

<p>Este es el listado completo, vale la pena ir dándole un vistazo:</p>
MAX 2009 Keynote - Day 1
<p>MAX 2009 Keynote - Day 1 MAX Keynote Day 1. To remain competitive and viable in a rapidly changing world, entire industries are faced with reinventing the way they do business. Runtime: 01:01:25 Average Rating: Added: Tuesday, October 6, 2009</p>
What's Coming in Adobe [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/adobe-max-2009/' rel='bookmark' title='Adobe MAX 2009'>Adobe MAX 2009</a></li>
<li><a href='http://www.codigoactionscript.org/url-para-ver-las-conferencias-de-adobe-en-vivo-2009/' rel='bookmark' title='URL para ver las conferencias de Adobe en Vivo 2009'>URL para ver las conferencias de Adobe en Vivo 2009</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-en-vivo-2009-en-su-version-online/' rel='bookmark' title='Adobe en Vivo 2009 en su versión onLine'>Adobe en Vivo 2009 en su versión onLine</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Como ya se anunció, para los que no hemos podido asistir en directo a las conferencias del<a href="http://max.adobe.com" target="_blank"> Adobe MAX</a> se han colocado la grabación de las sesiones en la web de <a href="http://tv.adobe.com/" target="_blank">Adobe.TV</a>.</p>
<img src="http://thumbnails.tv.adobe.com/8BDDC7D8-1C23-D1F3-EF04489504EDD9F7.jpg" alt="" />
<p>Este es el listado completo, vale la pena ir dándole un vistazo:</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/max-2009-keynote-day-1/" target="_blank">MAX 2009 Keynote - Day 1</a></h3>
<p>MAX 2009 Keynote - Day 1 MAX Keynote Day 1. To remain competitive and viable in a rapidly changing world, entire industries are faced with reinventing the way they do business. Runtime: 01:01:25 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/whats-coming-in-adobe-air-2-/" target="_blank">What's Coming in Adobe AIR 2</a></h3>
<p>What's Coming in Adobe AIR 2 Adobe AIR allows developers to build rich Internet applications (RIAs) that run outside the browser on multiple operating systems. In this session, you will learn about the planned capabilities of the upcoming release of Adobe AIR 2. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/understanding-the-building-blocks-of-adobes-solution-accelerator-program/" target="_blank">Understanding the Building Blocks of Adobe’s Solution...</a></h3>
<p>Understanding the Building Blocks of Adobe’s Solution Accelerator Program Learn how to accelerate enterprise application development while reducing costs and time to market by leveraging LiveCycle and Adobe Solution Accelerators. The session will include a review of all the available Solution Accelerators... Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/whats-next-in-livecycle-es/" target="_blank">What's Next in LiveCycle ES?</a></h3>
<p>What's Next in LiveCycle ES? Discover the latest application constructs that integrate the best-in-class technologies such as Flash Builder, Data Services, and LiveCycle ES solution components. Participants will learn how this software platform can be leveraged to enable the developm Runtime: 01:00:00 Average Rating: Added: Monday, October 5, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/pdf-files-via-the-web-creating-a-better-experience/" target="_blank">PDF Files via the Web: Creating a Better Experience</a></h3>
<p>PDF Files via the Web: Creating a Better Experience Learn how to get PDF files to behave on the web the way that you and your viewers want. We'll share best practices for making sure that PDF files are easy to read, navigate, and access, as well as how to make PDF files as streamlined as possible. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/coldfusion-with-microsoft-office-sharepoint-and-exchange/" target="_blank">ColdFusion with Microsoft Office, SharePoint, and Exc...</a></h3>
<p>ColdFusion with Microsoft Office, SharePoint, and Exchange Discover how ColdFusion 9 builds on existing support for Microsoft .NET and Exchange by featuring integration with Microsoft Office and SharePoint. In this session, you'll learn how to work with Excel spreadsheets and create PowerPoint presentations in CF Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/pdf-inside-and-out/" target="_blank">PDF: Inside and Out</a></h3>
<p>PDF: Inside and Out Learn surprising details about the inside of a PDF file. Learn about Adobe turning PDF over to the International Standards Organization(ISO). Adobe expert Jim King will describe what Adobe's original intentions were with PDF. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/explore-deployment-and-distribution-options-for-adobe-air-applications/" target="_blank">Explore Deployment and Distribution Options for Adobe...</a></h3>
<p>Explore Deployment and Distribution Options for Adobe AIR Applications Learn how to get your AIR applications to your users and how to keep them up to date. We will discuss important considerations for distribution on the Internet or an intranet, including impacts on your auto-update mechanism. Runtime: 01:00:00 Average Rating: Added: Monday, October 5, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/effects-in-flex-4/" target="_blank">Effects in Flex 4</a></h3>
<p>Effects in Flex 4 Explore the new and improved animation engine in Flex 4 that makes it possible to create richer and more dynamic applications. Come see how you can take advantage of the new effects and functionality, such as doing transformations in all three planes... Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/exploring-new-uses-for-rich-internet-applications-in-education/" target="_blank">Exploring New Uses for Rich Internet Applications in...</a></h3>
<p>Exploring New Uses for Rich Internet Applications in Education Join Kellen Maicher from Purdue University for a demonstration of the development of several Adobe AIR applications that integrate Flash, AIR, and Flex into existing curriculums. Maicher will describe the evolution of course material from primarily SWF co Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/adobe-enterprise-cloud-computing-livecycle-express/" target="_blank">Adobe Enterprise Cloud Computing: LiveCycle Express</a></h3>
<p>Adobe Enterprise Cloud Computing: LiveCycle Express See an overview of the technology behind recently released Adobe LiveCycle ES Developer Express. LiveCycle Express is an enterprise Software-as-a-Service (SaaS) product that leverages Adobe LiveCycle ES and cloud-based computing services. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/building-applications-for-iphone-with-flash-professional-cs5/" target="_blank">Building Applications for iPhone with Flash Professio...</a></h3>
<p>Building Applications for iPhone with Flash Professional CS5 Learn how Adobe is working to bring Adobe technologies out of the desktop and onto a the iPhone. Learn how Flash Professional and the Flash platform will add capabilities to help developers iPhone enable, test, and publish their content. Runtime: 01:00:00 Average Rating:  Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/advanced-data-visualization-with-flex/" target="_blank">Advanced Data Visualization with Flex</a></h3>
<p>Advanced Data Visualization with Flex Join fellow developers and information architects interested in going beyond the standard Flex Charting to focus on creating innovative and compelling data visualizations used to solve a wide range of data visualization challenges. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/developing-social-flex-apps-with-the-flash-collaboration-service-a-primer/" target="_blank">Developing Social Flex Apps with the Flash Collaborat...</a></h3>
<p>Developing Social Flex Apps with the Flash Collaboration Service - a Primer Learn everything you need to know to get up and running with the Adobe Flash Collaboration Service, a powerful way to add real-time social features to your Flex applications, such as live audio/video/data streaming... Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/gpu-acceleration-in-the-next-flash-player/" target="_blank">GPU Acceleration in the next Flash Player</a></h3>
<p>GPU Acceleration in the next Flash Player Learn what's possible with GPU acceleration in the next version of Flash Player. NVIDIA and Adobe collaborated to develop GPU acceleration that enables Flash Player to run fluidly on battery-powered mobile devices that are changing the face of computing. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/building-accessible-flex-and-adobe-air-applications/" target="_blank">Building Accessible Flex and Adobe AIR Applications</a></h3>
<p>Building Accessible Flex and Adobe AIR Applications Learn how to comply with accessibility standards and provide access for people with disabilities within your Flex and AIR applications. This session will provide an overview of how Flash Player communicates accessibility name, role, and state information Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/whats-new-in-flash-player/" target="_blank">What's New In Flash Player</a></h3>
<p>What's New In Flash Player A new and improved version of Flash Player is on its way! Discover how you can deliver optimized user experiences that leverage the same code, tools, and skills that reach millions of new users across multiple devices with the next version of Flash Player Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/leveraging-exposed-services-in-coldfusion-centaur/" target="_blank">Leveraging Exposed Services in ColdFusion Centaur</a></h3>
<p>Leveraging Exposed Services in ColdFusion Centaur Discover the incredible array of integrated services in ColdFusion that were previously available only to your ColdFusion code. ColdFusion Centaur now exposes these services via SOAP and AMF. In this session, you will learn how to deploy CF Centaur... Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/moving-from-flex-3-to-flex-4/" target="_blank">Moving from Flex 3 to Flex 4</a></h3>
<p>Moving from Flex 3 to Flex 4 Learn about the new features in Flex 4 from the perspective of someone who has been doing Flex 3 development. We'll discuss changes in MXML, states, effects, and CSS, as well as the new component model. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/encoding-best-practices-for-h364-video-using-flash/" target="_blank">Encoding Best Practices for H.264 Video Using Flash</a></h3>
<p>Encoding Best Practices for H.264 Video Using Flash This expert-driven deep dive will demonstrate how to get the best quality from your H.264 encoding and publishing to the web on the Adobe Flash Platform. Topics will include encoding parameters, analysis, resolutions, dynamic streaming, filtering Runtime: 01:00:00 Average Rating: Added: Monday, October 5, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/wow-your-audience-with-multimedia-pdf-documents/" target="_blank">Wow Your Audience with Multimedia PDF Documents</a></h3>
<p>Wow Your Audience with Multimedia PDF Documents Join U.K.-based Harry Hemus for a demonstration of some incredible PDF documents, all of which started life as static, noninteractive collateral. He'll show how to use various Creative Suite tools to create compelling content Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/building-flex-collaboration-components/" target="_blank">Building Flex Collaboration Components</a></h3>
<p>Building Flex Collaboration Components Learn how to use the Adobe Flash Collaboration Service to quickly add out-of-the-box collaboration components to your Flex applications. More importantly, discover a framework for creating custom components that include collaboration. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/the-advantages-of-flex/" target="_blank">The Advantages of Flex</a></h3>
<p>The Advantages of Flex Learn why Flex is great for RIA development and how it compares with other RIA technologies. This introductory level session will provide a high-level overview of the tools, languages, and framework provided by Flex. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/developing-for-information-assurance-with-livecycle-es/" target="_blank">Developing for Information Assurance with LiveCycle E...</a></h3>
<p>Developing for Information Assurance with LiveCycle ES Find out how to think proactively about security in order to manage risk and compliance when approaching design or development projects. Participants will learn best practices for leveraging LiveCycle ES to provide information-centric controls Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/adobe-services-soa-and-cloud-roadmap/" target="_blank">Adobe Services, SOA, and Cloud Roadmap</a></h3>
<p>Adobe Services, SOA, and Cloud Roadmap Join us for unique insight into Adobe's roadmap for SOA and cloud computing. Adobe technology entrepreneur Bill Shapiro will illustrate work that has been done for cloud-based products such as LiveCycle ES Developer Express Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/customizing-the-university-experience-with-a-rich-media-delivery-system/" target="_blank">Customizing the University Experience with a Rich Med...</a></h3>
<p>Customizing the University Experience with a Rich Media Delivery System Explore the potential of developing a customized, security-focused, RSS-driven delivery solution. This session shows how you can use Adobe Flash Media Rights Management Server, Flash Media Server 3, and Adobe Media Player Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/actionscript-30-tastes-good-and-is-good-for-you-too/" target="_blank">ActionScript 3.0 Tastes Good (and Is Good for You, To...</a></h3>
<p>ActionScript 3.0 Tastes Good (and Is Good for You, Too!) Learn how to harness ActionScript 3.0 to build meaningful and practical applications, including effective approaches to typical programming tasks. The building blocks we'll share are designed to take full advantage of ActionScript 3.0 as well as lay the f Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/flex-and-sap-transforming-enterprises-with-ria/" target="_blank">Flex and SAP: Transforming Enterprises with RIA</a></h3>
<p>Flex and SAP: Transforming Enterprises with RIA SAP evangelist Robert Horne will demonstrate how to create rich, Flex and AIR based data visualization dashboards using SAP BusinessObjects tools. Get an inside look at BusinessObjects Explorer, a powerful new way of gathering enterprise information. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/introduction-to-coldfusion-orm/" target="_blank">Introduction to ColdFusion ORM</a></h3>
<p>Introduction to ColdFusion ORM Discover one of the most significant additions to ColdFusion development, the object-relational mapping (ORM) framework built into ColdFusion 9. Powered by the Hibernate framework, ColdFusion 9 reintroduces the rapid in rapid application deployment. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/student-work-and-curricular-design-at-rit/" target="_blank">Student Work and Curricular Design at RIT</a></h3>
<p>Student Work and Curricular Design at RIT Explore the use of Adobe products as a platform for academic support. See how students discover the design process through team-based development and assessment in the Interactive Games and Media Department at Rochester Institute of Technology (RIT). Runtime: 01:00:00 Average Rating: Added: Monday, October 5, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/whats-new-in-flex-4/" target="_blank">What's New in Flex 4</a></h3>
<p>What's New in Flex 4 Come hear why folks are excited about the upcoming release of Flex 4. This session will explore the new component architecture and how skinning, effects, and layouts have been enhanced as a result. Also see how you can leverage new Flash Player 10 capabil Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/preview-flex-for-mobile-devices/" target="_blank">Preview: Flex for Mobile Devices</a></h3>
<p>Preview: Flex for Mobile Devices Hear directly from the team involved in enabling Flex on mobile devices regarding the challenges faced and progress made in optimization, components, and tooling. Runtime: 01:00:00 Average Rating:  Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/p2p-on-the-flash-platform-with-rtmfp/" target="_blank">P2P on the Flash Platform with RTMFP</a></h3>
<p>P2P on the Flash Platform with RTMFP Hear an introduction to peer-to-peer (P2P) communication and the Real Time Media Flow Protocol (RTMFP), used to create real-time social media applications that leverage the Adobe Flash Platform. Learn how the technology works from the engineers. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/managing-coldfusion-multiinstance-environments/" target="_blank">Managing ColdFusion Multi-Instance Environments</a></h3>
<p>Managing ColdFusion Multi-Instance Environments Learn how to create a production environment that can support multiple ColdFusion projects concurrently, without sacrificing security, scalability, or performance. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/designing-and-developing-for-the-multiscreen-web/" target="_blank">Designing and Developing for the Multiscreen Web</a></h3>
<p>Designing and Developing for the Multiscreen Web Enhance your content by making the most of its environment. As Flash Player supports new platforms and devices, your content is running on a diverse set of devices. Learn how to create applications that consider all factors. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/the-future-of-digital-publishing-delivering-news-through-adobe-air/" target="_blank">The Future of Digital Publishing: Delivering News thr...</a></h3>
<p>The Future of Digital Publishing: Delivering News through Adobe AIR Learn from Jeremy Clark of Adobe's Experience Design team how his group has leveraged Adobe AIR, Flex, and the Text Layout Framework (now in beta on Adobe Labs) to help the New York Times and others reach new and existing customers. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<h3><a href="http://tv.adobe.com/watch/max-2009-develop/advanced-coldfusion-caching-strategies/" target="_blank">Advanced ColdFusion Caching Strategies</a></h3>
<p>Advanced ColdFusion Caching Strategies Learn about the many built-in caching mechanisms available in ColdFusion for improving application performance, including exciting new features in the ColdFusion 9 release. Runtime: 01:00:00 Average Rating: Added: Tuesday, October 6, 2009</p>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/adobe-max-2009/' rel='bookmark' title='Adobe MAX 2009'>Adobe MAX 2009</a></li>
<li><a href='http://www.codigoactionscript.org/url-para-ver-las-conferencias-de-adobe-en-vivo-2009/' rel='bookmark' title='URL para ver las conferencias de Adobe en Vivo 2009'>URL para ver las conferencias de Adobe en Vivo 2009</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-en-vivo-2009-en-su-version-online/' rel='bookmark' title='Adobe en Vivo 2009 en su versión onLine'>Adobe en Vivo 2009 en su versión onLine</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/videos-online-de-las-sesiones-del-adobe-max-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Curso de Adobe AIR, online y gratuito, en Video2brain</title>
		<link>http://www.codigoactionscript.org/curso-de-adobe-air-online-y-gratuito-en-video2brain/</link>
		<comments>http://www.codigoactionscript.org/curso-de-adobe-air-online-y-gratuito-en-video2brain/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 14:35:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Aportes]]></category>
		<category><![CDATA[Cursos]]></category>
		<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Publicidad]]></category>
		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=517</guid>
		<description><![CDATA[<p>Para quienes no lo conozcan aun, Video2brain es Centro de formación autorizado de Adobe que ofrece cursos online en vídeo de calidad de numerosas aplicaciones de Adobe. </p>
<p>Actualmente tienen disponible un curso de Adobe AIR totalmente gratuito a cargo de Jorge Glez. Villanueva, responsable de, entre otros, los cursos Adobe Flash CS3 y Adobe Dreamweaver CS3. Este vídeo-training es una introducción en el uso de AIR, para aprender a programar aplicaciones
de escritorio usando los programas de Adobe, Flex y Flash.

Índice del curso:</p>

Descripción del runtime AIR. Instalación de la aplicación
Creación de [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/69/' rel='bookmark' title='Tutoriales de Adobe Flex y Apollo para principiantes'>Tutoriales de Adobe Flex y Apollo para principiantes</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-en-vivo-2009-en-su-version-online/' rel='bookmark' title='Adobe en Vivo 2009 en su versión onLine'>Adobe en Vivo 2009 en su versión onLine</a></li>
<li><a href='http://www.codigoactionscript.org/aplicaciones-ios-4-veces-mas-rapidas-con-adobe-air-2-7/' rel='bookmark' title='Aplicaciones iOS 4 veces más rápidas con Adobe AIR 2.7'>Aplicaciones iOS 4 veces más rápidas con Adobe AIR 2.7</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Para quienes no lo conozcan aun, <a href="http://www.video2brain.com/es/">Video2brain</a> es Centro de formación autorizado de Adobe que ofrece cursos online en vídeo de calidad de numerosas aplicaciones de Adobe. </p>
<p>Actualmente tienen disponible un curso de <a href="http://www.video2brain.com/es/products-14.htm">Adobe AIR</a> totalmente gratuito a cargo de <a href="http://www.video2brain.com/es/trainer-12-p14.htm">Jorge Glez. Villanueva</a>, responsable de, entre otros, los cursos Adobe Flash CS3 y Adobe Dreamweaver CS3. Este vídeo-training es una introducción en el uso de AIR, para aprender a programar aplicaciones<br />
de escritorio usando los programas de Adobe, Flex y Flash.<br />
<div align="center"><a href="http://www.video2brain.com/es/products-14.htm"><img src="http://www.video2brain.com/es/images_dynam/product/thumbs/AIR_online.jpg" alt="" /></a></div><br />
<strong>Índice del curso:</strong></p>
<ul>
<li>Descripción del runtime AIR. Instalación de la aplicación</li>
<li>Creación de un ejemplo de xml cargado a través de PHP en un DataGrid que corra como aplicación de escritorio</li>
<li>Creación de un ejemplo simple de drag and drop sobre el escritorio</li>
<li>Creación de una aplicación AIR basada en ActionScript 3. Control de la ventana de la aplicación</li>
<li>Uso de la API de control de ficheros de ActionScript/AIR: crear, copiar, borrar y seleccionar archivos</li>
<li>Uso del drag and drop de AIR. Aplicación que permite arrastrar imágenes al escritorio</li>
<li>Creación de aplicaciones AIR: personalización del icono de las aplicaciones. Uso de certificados</li>
</ul>
<p><strong>Enlace del curso:</strong></p>
<ul>
<li><a href="http://www.video2brain.com/es/products-14.htm">http://www.video2brain.com/es/products-14.htm</a></li>
</ul>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/69/' rel='bookmark' title='Tutoriales de Adobe Flex y Apollo para principiantes'>Tutoriales de Adobe Flex y Apollo para principiantes</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-en-vivo-2009-en-su-version-online/' rel='bookmark' title='Adobe en Vivo 2009 en su versión onLine'>Adobe en Vivo 2009 en su versión onLine</a></li>
<li><a href='http://www.codigoactionscript.org/aplicaciones-ios-4-veces-mas-rapidas-con-adobe-air-2-7/' rel='bookmark' title='Aplicaciones iOS 4 veces más rápidas con Adobe AIR 2.7'>Aplicaciones iOS 4 veces más rápidas con Adobe AIR 2.7</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/curso-de-adobe-air-online-y-gratuito-en-video2brain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programación orientada a objetos: Herencia de clases.</title>
		<link>http://www.codigoactionscript.org/programacion-orientada-a-objetos-herencia-de-clases/</link>
		<comments>http://www.codigoactionscript.org/programacion-orientada-a-objetos-herencia-de-clases/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 00:49:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Avanzado]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[POO]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[patrones]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=325</guid>
		<description><![CDATA[<p>La herencia de clases es uno de los conceptos básicos de la programación orientada a objetos. Decir que una clase hereda de otra quiere decir que esa clase obtiene los mismos métodos y propiedades de la otra clase. Permitiendo de esta forma añadir a las características heredadas las suyas propias.</p>
<p>Supongamos que tenemos una clase "Persona" con los métodos y propiedades básicas de una objeto persona como podrian ser "caminar" o "hablar", podríamos tener otras clases como "Guillermo" o "Elder" que comparten todas las características de una "Persona" pero que añaden [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/comunicacion-entre-clases-actionscript-3-con-eventdispatcher/' rel='bookmark' title='Comunicación entre clases Actionscript 3 con EventDispatcher'>Comunicación entre clases Actionscript 3 con EventDispatcher</a></li>
<li><a href='http://www.codigoactionscript.org/poo-dependencia-de-clases-y-polimorfismo/' rel='bookmark' title='POO: Dependencia de clases y Polimorfismo'>POO: Dependencia de clases y Polimorfismo</a></li>
<li><a href='http://www.codigoactionscript.org/como-duplicar-movieclips-con-graficos-en-actionscript-3/' rel='bookmark' title='Cómo duplicar MovieClips con gráficos en ActionScript 3'>Cómo duplicar MovieClips con gráficos en ActionScript 3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>La <strong>herencia de clases</strong> es uno de los conceptos básicos de la <strong>programación orientada a objetos</strong>. Decir que una clase hereda de otra quiere decir que esa clase obtiene los mismos métodos y propiedades de la otra clase. Permitiendo de esta forma añadir a las características heredadas las suyas propias.</p>
<p>Supongamos que tenemos una clase "Persona" con los métodos y propiedades básicas de una objeto persona como podrian ser "caminar" o "hablar", podríamos tener otras clases como "Guillermo" o "Elder" que comparten todas las características de una "Persona" pero que añaden características propias. Por lo que "Guillermo" y "Elder" pueden realizar las </p>
<p>mismas funciones que puede realizar una "Persona" y además cada una puede realizar las suyas propias, por ejemplo, "Guillermo" sabe nadar pero "Elder" no, y "Elder" sabe bailar reggeton pero "Guillermo" no.</p>
<p>En terminos de programación estaríamos diciendo que "Guillermo" y "Elder" son dos clases especializadas que heredan o extienden de la superclase "Persona".</p>
<h2>Tipos de herencia de clases</h2>
<p>Existen <strong>dos tipos</strong> de herencia:</p>
<ul>
<li>Herencia por <strong>especialización</strong></li>
<li>Herencia por <strong>generalización</strong></li>
</ul>
<p>En realidad <strong>la herencia es la misma</strong>, esta es una diferenciación puramente conceptual sobre la forma en que se a llegado a ella. </p>
<p>Una <strong>herencia por especialización</strong> es la que se realiza cuando necesitamos crear una clase nueva que disponga de las mismas características que otra pero que le añada funcionalidades. Por ejemplo si tenemos una clase que genera un botón simple, y necesitamos crear un botón que sea igual que el anterior pero que además añada un efecto al ser clicado.</p>
<p>La <strong>herencia por generalización</strong> es la que realizamos cuando tenemos muchas clases que comparten unas mismas funcionalidades y por homogeneizar las partes comunes se decide crear una clase que implemente toda esa parte común y se dejan solo las partes especificas en cada clase. Por ejemplo si tenemos clases para dibujar formas geométricas todas ellas </p>
<p>disponen de las mismas propiedades (un color de fondo, color de linea, etc..), todas estas características pueden estar en una clase general de la que hereden todas las clases concretas, evitando tener que escribir todo ese código común en todas ellas.</p>
<h1>Herencia de clases en Actionscript</h1>
<p>En Actionscript definimos que una clase hereda de otra con la sentencia "<strong>extends</strong>".</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-12">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Guillermo <span style="color: #0066CC;">extends</span> Persona </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<h2>Public, private o protected</h2>
<p>Una consideración a tener en cuenta de la herencia es que una clase <strong>no hereda</strong> la propiedades o métodos <strong>privados</strong>, con lo que no tendrán acceso a ellas. Si necesitamos heredar propiedades o métodos que no queremos que sean accesibles desde fuera de las clases las definiremos como <strong>protected</strong>.</p>
<h2>Sobreescritura de métodos</h2>
<p>Una característica muy importante que permite la herencia es que podemos hacer que una clase implemente <strong>de manera diferente</strong> un método heredado. Haciendo que dos clases que heredan de la misma clase y heredan los mismos métodos se comporten de maneras diferentes.</p>
<p>Por ejemplo, unas clases de dibujo de figuras geométricas pueden heredar de una clase general la función "dibujar". Todas las clases dispondrán de esa función, pero cada clase la implementará de diferente manera y por lo tanto dibujará una figura diferente.</p>
<p>Para sobrescribir un método de la superclase utilizaremos la sentencia <strong>override</strong> en la definición del método.</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-13"><a href="#" onclick="javascript:showPlainTxt('actionscript-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-13">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//función de la superclase</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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> traza<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"superclase"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-14">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//función de la subclase</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> traza<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"subclase"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>De esta manera al ejecutar la función "traza()" desde una subclase obtendremos el texto "subclase" sobrescribiendo las acciones del método de la subclase (no obtendríamos el texto "superclase").</p>
<p>En el caso de no querer sobrescribir por completo toda la implementación del método de la superclase, si no que lo que queremos es ampliarlo, podemos acceder a la implementación de la superclase con el operador "super". </p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-15"><a href="#" onclick="javascript:showPlainTxt('actionscript-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-15">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//función de la subclase</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> traza<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">super</span>.<span style="color: #006600;">traza</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"subclase"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>En este caso, se ejecutaría la implementación del método en la superclase (obtendriamos el texto "superclase") y luego el de la subclase (obtendríamos también el texto "subclase").</p>
<p>Esto también lo podemos realizar en el constructor de la clase. Es bastante probable que una clase esté definiendo valores dentro de su constructor, de manera que al ser extendida nos interese que esas definiciones se continúen realizando. En este caso deberemos realizar una llamada al constructor de la superclase a través del operador "super".</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-16"><a href="#" onclick="javascript:showPlainTxt('actionscript-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-16">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> A</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">variable</span>:uint;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> A<span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">variable</span> = n;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-17"><a href="#" onclick="javascript:showPlainTxt('actionscript-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-17">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> A;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> B <span style="color: #0066CC;">extends</span> A</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> B<span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span>n<span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//ejecuta el contructor de la clase A, enviandole el parámetro</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>En el caso de que queramos asegurarnos de que una propiedad o método no pueda ser sobrescrita por otra clase la definiremos como <strong>final</strong>.</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-18"><a href="#" onclick="javascript:showPlainTxt('actionscript-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-18">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//función de la subclase que no permitirá ser sobreescrita</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> final <span style="color: #000000; font-weight: bold;">function</span> traza<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"subclase"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<h1>Ejemplo del uso de herencia de clases:</h1>
<p>Veamos un sencillo ejemplo práctico: <strong>Crearemos un par de clases muy simples para dibujar un cuadrado o un círculo</strong>.</p>
<p>Lógicamente el primer paso es pensar que <strong>características compartirán</strong> tanto los cuadrados y los círculos.</p>
<ul>
<li>Ambos son elementos gráficos que tienen propiedades que definen su tamaño (size), si disponen de relleno o solo de línea (fill), el color de relleno (bgColor), el grosor de linea (borderSize) y el color de la linea (borderColor).</li>
<li>Tambien ambás dispondrán de una función que permitirá actualizar el gráfico en caso de modificar sus propiedades.</li>
<li>Por último amb´s dispondran de la método que dibujará el gráfico. Lógicamente esta será la función que cada clase implementará de forma diferente.</li>
</ul>
<p>Así que lo que haremos es crear una superclase "Grafico" que disponga de todas las propiedades mencionadas anteriormente, y dejaremos la implementación del método "dibuja()" a las subclases "Cuadrado" y "Circulo".</p>
<p>Empecemos escribiendo la interface de métodos públicos que deberán disponer todos los objetos que extiendan de "Grafico". En este caso serán todos los <em>setters </em>y <em>getters </em>para las propiedades, y el método para actualizar el gráfico.</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-19"><a href="#" onclick="javascript:showPlainTxt('actionscript-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-19">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">interface</span> IGrafico</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">size</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">size</span><span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> fill<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> fill<span style="color: #66cc66;">&#40;</span>n:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> bgColor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> bgColor<span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> borderSize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> borderSize<span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">borderColor</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">borderColor</span><span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Escribiremos la superclase "Grafico" que implementará la interface "IGrafico" y definirá todos los setters y getters de las propiedades.</p>
<p>Las propiedades las definiremos como "portected" para que sean privadas pero heredables.</p>
<p>El constructor de la clase recibirá todos los parámetros necesarios para definir las propiedades (les asignaremos valores por defecto por si se crea una instancia sin pasarle parámetros). Y realizará una llamada a la función "dibuja()" que es la que creará el gráfico.</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-20"><a href="#" onclick="javascript:showPlainTxt('actionscript-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-20">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">IGrafico</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Grafico <span style="color: #0066CC;">extends</span> Sprite <span style="color: #0066CC;">implements</span> IGrafico</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _size:uint;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _fill:<span style="color: #0066CC;">Boolean</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _bgColor:uint;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _borderSize:uint;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _borderColor:uint;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Grafico<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">size</span>:uint = <span style="color: #cc66cc;color:#800000;">10</span>, fill:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>, bgColor:uint = 0x000000, borderSize:uint = <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #0066CC;">borderColor</span>:uint = 0x000000<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _size = <span style="color: #0066CC;">size</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _fill = fill;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _bgColor = bgColor;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderSize = borderSize;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderColor = <span style="color: #0066CC;">borderColor</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">size</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _size;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">size</span><span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _size = n;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> fill<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _fill;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> fill<span style="color: #66cc66;">&#40;</span>n:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _fill = n;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> bgColor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _size;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> bgColor<span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _bgColor = n;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> borderSize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _borderSize;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> borderSize<span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderSize = n;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">borderColor</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _borderColor;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">borderColor</span><span style="color: #66cc66;">&#40;</span>n:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderColor = n;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">Throw</span>.<span style="color: #006600;">newError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"clase abstracta"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Como hemos dicho, la clase "Grafico" no implementa el método "dibuja()" ya que eso depende de cada subclase, con lo que si intentamos crear una instancia de "Grafico" nos lanzará un error. Lo único que hacemos es definir que todas las subclases hereden el método y cada una lo implenete a su manera.</p>
<p>Escribamos ahora la clase "Cuadrado".</p>
<p>Esta clase extendrá de la clase "Grafico" e implementará la interface "IGrafico". Por lo tanto heredará todas las propiedades y métodos de la superclase marcados como public o protected, con lo que no necesitaremos definir las protiedades ni los setter y getters, pero dispondrá de ellos.</p>
<p>El constructor de esta clase recibirá como parámetros los valores del objeto a crear, y deberemos pasarselos al constructor de la superclase para que asigne los valores y ejecute la función de dibujar. Como hemos mencionado esto lo haremos utilizando la sentencia super();</p>
<p>Ahora solo nos quedará sobreescribir el método "dibuja()" para que se dibuje lo que nos interese en función de la clase actual, en este caso queremo sdibujar un cuadrado. Utilizaremos un override para sobrescribir el método.</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-21"><a href="#" onclick="javascript:showPlainTxt('actionscript-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-21">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">IGrafico</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">Grafico</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Cuadrado <span style="color: #0066CC;">extends</span> Grafico <span style="color: #0066CC;">implements</span> IGrafico</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Cuadrado<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">size</span>:uint = <span style="color: #cc66cc;color:#800000;">10</span>, fill:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>, bgColor:uint = 0x000000, borderSize:uint = <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #0066CC;">borderColor</span>:uint = 0x000000<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">size</span>, fill, bgColor, borderSize, <span style="color: #0066CC;">borderColor</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; override protected <span style="color: #000000; font-weight: bold;">function</span> dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_fill == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>_bgColor<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_borderSize != <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span>_borderSize, _borderColor<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #cc66cc;color:#800000;">0</span>, _size, _size<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_fill == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Haremos lo mismo para la clase "Circulo". Únicamente deberemos implementar de diferente manera el método "dibuja".</p>
<div id="codigo">
<div class="igBar"><span id="lactionscript-22"><a href="#" onclick="javascript:showPlainTxt('actionscript-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-22">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">IGrafico</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">Grafico</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Circulo <span style="color: #0066CC;">extends</span> Grafico <span style="color: #0066CC;">implements</span> IGrafico</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Circulo<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">size</span>:uint = <span style="color: #cc66cc;color:#800000;">10</span>, fill:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>, bgColor:uint = 0x000000, borderSize:uint = <span style="color: #cc66cc;color:#800000;">0</span>, bordeColor:uint = 0x000000<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">size</span>, fill, bgColor, borderSize, <span style="color: #0066CC;">borderColor</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; override protected <span style="color: #000000; font-weight: bold;">function</span> dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_fill == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>_bgColor<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_borderSize != <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span>_borderSize, _borderColor<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> radio:uint = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span>_size / <span style="color: #cc66cc;color:#800000;">2</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span>radio, radio, radio<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_fill == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>A partir de aquí iremos creando tantas clases como gráficos diferentes nos interese dibujar, incluso podemos extender estas subclases en otras subclases, por ejemplo para crear objetos más complejos pero que su base sea un cuadrado o un circulo.</p>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/comunicacion-entre-clases-actionscript-3-con-eventdispatcher/' rel='bookmark' title='Comunicación entre clases Actionscript 3 con EventDispatcher'>Comunicación entre clases Actionscript 3 con EventDispatcher</a></li>
<li><a href='http://www.codigoactionscript.org/poo-dependencia-de-clases-y-polimorfismo/' rel='bookmark' title='POO: Dependencia de clases y Polimorfismo'>POO: Dependencia de clases y Polimorfismo</a></li>
<li><a href='http://www.codigoactionscript.org/como-duplicar-movieclips-con-graficos-en-actionscript-3/' rel='bookmark' title='Cómo duplicar MovieClips con gráficos en ActionScript 3'>Cómo duplicar MovieClips con gráficos en ActionScript 3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/programacion-orientada-a-objetos-herencia-de-clases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AdobeTV: Videotutorial de creacion de componentes en Flex</title>
		<link>http://www.codigoactionscript.org/adovetv-videotutorial-de-creacion-de-componentes-en-flex/</link>
		<comments>http://www.codigoactionscript.org/adovetv-videotutorial-de-creacion-de-componentes-en-flex/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 03:24:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aportes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[componentes]]></category>
		<category><![CDATA[vidotutorial]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=302</guid>
		<description><![CDATA[<p>Videotutorial "Creating New Components in Flex 3" por Deepa Subramaniam</p>
<p></p>
<p>Related posts:
Personalizar la tipografía en componentes Flex
Personalizar componentes de Flex con estilos programáticos
Modificar datos en componentes Flex con ItemEditors
</p>
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Personalizar la tipografía en componentes Flex'>Personalizar la tipografía en componentes Flex</a></li>
<li><a href='http://www.codigoactionscript.org/personalizar-componentes-de-flex-con-estilos-programaticos/' rel='bookmark' title='Personalizar componentes de Flex con estilos programáticos'>Personalizar componentes de Flex con estilos programáticos</a></li>
<li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Modificar datos en componentes Flex con ItemEditors'>Modificar datos en componentes Flex con ItemEditors</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Videotutorial "<em>Creating New Components in Flex 3</em>" por Deepa Subramaniam</p>
<p><embed src="http://tv.adobe.com/Embed.swf" quality="high" bgcolor="#000000" width="600" height="385" name="AdobeTVPlayer" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashVars="v=~b64~aHR0cDovL2Fkb2JlLmVkZ2Vib3NzLm5ldC9mbGFzaC9hZG9iZS9hZG9iZXR2Mi9tYXhfMjAwOF9kZXZlbG9wLzE1OTY3NDE2MTNfMjkyNzMxNDAwMV8yMDAxLWRlbm5lcnQtdHVlLTQzMHBtLWRlc2lnbi1kZXZlbG9wLmZsdj9yc3NfZmVlZGlkPTE1Mzg0JnhtbHZlcnM9Mg==&#038;w=600&#038;t=http://tv.adobe.com/#vi+f15384v1008&#038;h=385"></embed></p>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Personalizar la tipografía en componentes Flex'>Personalizar la tipografía en componentes Flex</a></li>
<li><a href='http://www.codigoactionscript.org/personalizar-componentes-de-flex-con-estilos-programaticos/' rel='bookmark' title='Personalizar componentes de Flex con estilos programáticos'>Personalizar componentes de Flex con estilos programáticos</a></li>
<li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Modificar datos en componentes Flex con ItemEditors'>Modificar datos en componentes Flex con ItemEditors</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/adovetv-videotutorial-de-creacion-de-componentes-en-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modificar datos en componentes Flex con ItemEditors</title>
		<link>http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/</link>
		<comments>http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 01:10:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=131</guid>
		<description><![CDATA[<p>En este =http://www.cristalab.com/tipstip[/url], siguiendo un poco el ejemplo visto en el tip anterior, mostraré el uso de itemRenderes e itemEditors para mostrar y editar datos dentro de componentes basados en listas, como el componente List, el DataGrid o el TileList...</p>
<p>Como se vió en el tip anterior los itemRenderer (y los itemEditors) nos permiten incrustar otros componentes Flex dentro de los listados de los componentes basados en listas, para poder mostrar la información de manera más compleja. Pudiendo de esta manara mostrar imágenes dentro de un DataGrid o fichas de productos [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Cómo mostrar tooltips dentro de componentes List de Flex'>Cómo mostrar tooltips dentro de componentes List de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/' rel='bookmark' title='Cómo personalizar los iconos en componentes Tree de Flex'>Cómo personalizar los iconos en componentes Tree de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Personalizar la tipografía en componentes Flex'>Personalizar la tipografía en componentes Flex</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En este <a href="http://www.cristalab.com/tips">=http://www.cristalab.com/tips</a>tip[/url], siguiendo un poco el ejemplo visto en el <a href="http://www.cristalab.com/foros/t58580_como-mostrar-tooltips-dentro-de-componentes-list-de-flex.html">tip anterior</a>, mostraré el uso de <strong>itemRenderes </strong>e <strong>itemEditors </strong>para mostrar y editar datos dentro de componentes basados en listas, como el componente <strong>List</strong>, el <strong>DataGrid </strong>o el <strong>TileList</strong>...</p>
<p>Como se vió en el tip anterior los itemRenderer (y los itemEditors) nos permiten incrustar otros componentes Flex dentro de los listados de los componentes basados en listas, para poder mostrar la información de manera más compleja. Pudiendo de esta manara mostrar imágenes dentro de un DataGrid o fichas de productos dentro de un TileList.</p>
<p>Hay muchos casos en que esta información mostrada en los componentes nos interesa que sea modificable. Por ejemplo, siguiendo el <a href="http://www.cristalab.com/foros/t58580_como-mostrar-tooltips-dentro-de-componentes-list-de-flex.html">ejemplo anterior</a>, imaginemos que tenemos un <strong>DataGrid </strong>que nos muestra un <strong>listado de usuarios y su nivel de ClabLevel</strong>. El código básico para visualizar este componente sería el siguiente:</p>
<div id="codigo">
<div class="igBar"><span id="lcode-29"><a href="#" onclick="javascript:showPlainTxt('code-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-29">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:DataGrid </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:columns&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Claber"</span> dataField=<span style="color:#CC0000;">"label"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Clablevel"</span> dataField=<span style="color:#CC0000;">"level"</span>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:DataGridColumn&gt;&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:columns&gt;&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:DataGrid&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Este sería el resultado:</p>
<div align="center"><div align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="" height="">  <param name="movie" value="http://www.cristalab.com/images/tips/flex/itemEditor/ItemRenderer0.swf" />  <param name="quality" value="high" /> <embed src="http://www.cristalab.com/images/tips/flex/itemEditor/ItemRenderer0.swf" width="" height="" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></div></div>
<p>Para nuestro ejemplo lo que nos interesa es que estos valores de ClabLevel sean modificables. Para poder realzar esta función únicamente deberemos añadirle a las propiedades del DataGrid la opción de "editable".</p>
<div id="codigo">
<div class="igBar"><span id="lcode-30"><a href="#" onclick="javascript:showPlainTxt('code-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-30">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:DataGrid </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; editable=<span style="color:#CC0000;">"true"</span>&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Con solo realizar esta acción tendremos la opción de dar doble-clic sobre los campos del DataGrid para modificar los valores.</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/flex/itemEditor/cap_002.jpg" alt="" /></div>
<p>Hay que tener en cuenta de que todas las columnas del DataGrid ahora son modificables. En el caso de que no queramos que alguna lo sea, por ejemplo la columna que muestra los nombres, deberemos añadir esa propiedad "editable" a la columna pero con valor <em>false</em>.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-31"><a href="#" onclick="javascript:showPlainTxt('code-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-31">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Claber"</span> dataField=<span style="color:#CC0000;">"label"</span> editable=<span style="color:#CC0000;">"false"</span>/&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Ahora bien, supongamos que nos interesa tener una opción contreta a la hora de modificar estos valores. Por ejemplo con un componente <strong>NumericStepper</strong>, para ir modificando estos valores uno a uno. De manera de que al hacer doble-clic para modificar ese valor numérico apareciese el componente que nos permitiera tener esa función:</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/flex/itemEditor/cap_001.jpg" alt="" /></div>
<p>Para hacer esto delegaremos la función de editaje a un componente <strong>NumericStepper</strong> a través de un <strong>itemEditor</strong>.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-32"><a href="#" onclick="javascript:showPlainTxt('code-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-32">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:columns&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Claber"</span> dataField=<span style="color:#CC0000;">"label"</span> editable=<span style="color:#CC0000;">"false"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Clablevel"</span> dataField=<span style="color:#CC0000;">"level"</span> editorDataField=<span style="color:#CC0000;">"value"</span>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:itemEditor&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:NumericStepper minimum=<span style="color:#CC0000;">"0"</span> maximum=<span style="color:#CC0000;">"99999"</span> stepSize=<span style="color:#CC0000;">"1"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:itemEditor&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:DataGridColumn&gt;&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:columns&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Este es el resultado:</p>
<div align="center"><div align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="" height="">  <param name="movie" value="http://www.cristalab.com/images/tips/flex/itemEditor/ItemRenderer1.swf" />  <param name="quality" value="high" /> <embed src="http://www.cristalab.com/images/tips/flex/itemEditor/ItemRenderer1.swf" width="" height="" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></div></div>
<p>Visto esto, también hay que decir que con un <strong>ItemRenderer </strong>también podemos hacer que estos datos sean modificables. En este caso haremos que toda la columna de datos se visualicen  con el componente <strong>NumericStepper</strong> indicando que este sea el itemRenderer para esa columna.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-33"><a href="#" onclick="javascript:showPlainTxt('code-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-33">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Clablevel"</span> dataField=<span style="color:#CC0000;">"level"</span> rendererIsEditor=<span style="color:#CC0000;">"true"</span> editorDataField=<span style="color:#CC0000;">"value"</span>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:itemRenderer&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:NumericStepper minimum=<span style="color:#CC0000;">"0"</span> maximum=<span style="color:#CC0000;">"99999"</span> stepSize=<span style="color:#CC0000;">"1"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:itemRenderer&gt;&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:DataGridColumn&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Fijémonos que hemos añadido el parámetro <strong>rendererIsEditor</strong> para indicar que el componente añadido como itemRenderer funciona como editor, de manera que al modificar  un valor con el componente NumericStepper en cualquiera de los registros este nuevo valor queda registrado.</p>
<div align="center"><div align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="" height="">  <param name="movie" value="http://www.cristalab.com/images/tips/flex/itemEditor/ItemRenderer2.swf" />  <param name="quality" value="high" /> <embed src="http://www.cristalab.com/images/tips/flex/itemEditor/ItemRenderer2.swf" width="" height="" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></div></div>
<p>Este es el código completo con el <strong>ItemEditor</strong>:</p>
<div id="codigo">
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showPlainTxt('code-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"utf-8"</span>?&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Application xmlns:mx=<span style="color:#CC0000;">"http://www.adobe.com/2006/mxml"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; layout=<span style="color:#CC0000;">"absolute"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:Script&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:Script&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:ArrayCollection id=<span style="color:#CC0000;">"listado"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:ArrayCollection&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:DataGrid </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; editable=<span style="color:#CC0000;">"true"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:columns&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Claber"</span> dataField=<span style="color:#CC0000;">"label"</span> editable=<span style="color:#CC0000;">"false"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Clablevel"</span> dataField=<span style="color:#CC0000;">"level"</span> editorDataField=<span style="color:#CC0000;">"value"</span>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:itemEditor&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:NumericStepper minimum=<span style="color:#CC0000;">"0"</span> maximum=<span style="color:#CC0000;">"99999"</span> stepSize=<span style="color:#CC0000;">"1"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:itemEditor&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:DataGridColumn&gt;&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:columns&gt;&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:DataGrid&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Application&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Cómo mostrar tooltips dentro de componentes List de Flex'>Cómo mostrar tooltips dentro de componentes List de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/' rel='bookmark' title='Cómo personalizar los iconos en componentes Tree de Flex'>Cómo personalizar los iconos en componentes Tree de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Personalizar la tipografía en componentes Flex'>Personalizar la tipografía en componentes Flex</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cómo personalizar los iconos en componentes Tree de Flex</title>
		<link>http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/</link>
		<comments>http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 00:45:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=126</guid>
		<description><![CDATA[<p>En este =http://www.cristalab.com/tipstip[/url] mostraré como podemos personalizar los iconos de las carpetas y de los objetos que se visualizan en un componente Tree en Flex.</p>
<p>Para empezar veremos que automáticamente Flex coloca unos iconos por defecto al visualizar un componente Tree. Un icono de carpete abierta o cerrada segun sea el caso, y una hoja de papel en blanco para los objetos:</p>

<p>Ahora veremos cómo podemos utilizar nuestros propios iconos.</p>
<p>Para este ejemplo he utilizado el siguiente dataProvider de base, que consta de un XMLList que coloca a los diferentes Claber en nodos [...]
Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Modificar datos en componentes Flex con ItemEditors'>Modificar datos en componentes Flex con ItemEditors</a></li>
<li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Cómo mostrar tooltips dentro de componentes List de Flex'>Cómo mostrar tooltips dentro de componentes List de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Personalizar la tipografía en componentes Flex'>Personalizar la tipografía en componentes Flex</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>En este <a href="http://www.cristalab.com/tips">=http://www.cristalab.com/tips</a>tip[/url] mostraré como podemos personalizar los iconos de las carpetas y de los objetos que se visualizan en un componente Tree en <a href="http://www.cristalab.com/tips/tags/flex">Flex</a>.</p>
<p>Para empezar veremos que automáticamente Flex coloca unos iconos por defecto al visualizar un componente Tree. Un icono de carpete abierta o cerrada segun sea el caso, y una hoja de papel en blanco para los objetos:</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/flex/TreeIcons/cap_001.jpg" alt="" /></div>
<p>Ahora veremos cómo podemos utilizar nuestros propios iconos.</p>
<p>Para este ejemplo he utilizado el siguiente <strong>dataProvider </strong>de base, que consta de un <strong>XMLList </strong>que coloca a los diferentes Claber en nodos según su grupo.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-44"><a href="#" onclick="javascript:showPlainTxt('code-44'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-44">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:XMLList id=<span style="color:#CC0000;">"listado"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"admin"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"Bofh"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"swat"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"pda"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"claber"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:XMLList&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Este <strong>XMLList </strong>añadido a un componente <strong>Tree </strong>daría el resultado estándar.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-45"><a href="#" onclick="javascript:showPlainTxt('code-45'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-45">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Tree&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Para poder asignarle unos nuevos iconos al componente lo primero que hay que hacer es incorporar a la aplicación los archivos bitmap de los iconos e incluirlos como Clases. Para ello crearemos las variables dentro del tag <strong><mx:script></strong>, embederemos los bitmaps y haremos las variables Blindables.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-46"><a href="#" onclick="javascript:showPlainTxt('code-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-46">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Script&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico1.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; private var ico1:Class;&nbsp;&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico2.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; private var ico2:Class;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico3.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; private var ico3:Class;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Script&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Ahora asignaremos estas clases que contienen los bitmaps a los iconos personalizados del componente. Para ello utilizaremos las propiedades del componente <strong>folderClosedIcon</strong>, <strong>folderOpenIcon</strong>, <strong>defaultLeafIcon </strong>para los diferentes casos.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-47"><a href="#" onclick="javascript:showPlainTxt('code-47'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-47">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; folderClosedIcon=<span style="color:#CC0000;">"{ico1}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; folderOpenIcon=<span style="color:#CC0000;">"{ico2}"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; defaultLeafIcon=<span style="color:#CC0000;">"{ico3}"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Tree&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Solo con esto al publicar la aplicación ya hemos personalizado los iconos:</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/flex/TreeIcons/cap_002.jpg" alt="" /></div>
<p>Ahora vamos a ver un caso algo más complejo, imaginemos que necesitamos<strong> un icono diferente para diferentes grupos de objetos</strong>, por ejemplo un icono para los clabers hombre y otro para las clabers mujeres. para realizar esto ya deberemos echar mano de actionscript.</p>
<p>lo primero será asignar una función que controlará los iconos el componente. Si realizamos esta acción podemos eliminar las propiedades de iconos personalizados ya que esos valores se sobreescribirán con los de la función actionscript. En este caso crearemos una función llamada <em>setGeneroIcon</em>.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-48"><a href="#" onclick="javascript:showPlainTxt('code-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-48">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; iconFunction=<span style="color:#CC0000;">"setGeneroIcon"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Tree&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Ahora bien, para conseguir el mismo efecto de iconos de carpeta abierta y cerrada, y el nuevo icono diferenciado segun el genero del claber, deberemos modificar un poco el XMLList, añadiéndole unos parámetros a los nodos. Añadiremos un parametro que nos indique que el nodo en cuestión es una carpeta (<em>folder="true"</em>), y añadiremos un parámetro a los nodos de los clabers que nos indique su genero (<em>genero="M" </em>o<em> genero="F"</em>).</p>
<div id="codigo">
<div class="igBar"><span id="lcode-49"><a href="#" onclick="javascript:showPlainTxt('code-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-49">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:XMLList id=<span style="color:#CC0000;">"listado"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"admin"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"Both"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span> genero=<span style="color:#CC0000;">"F"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"swat"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"pda"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span> genero=<span style="color:#CC0000;">"F"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"claber"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span> genero=<span style="color:#CC0000;">"F"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:XMLList&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>Ahora toca crear la función que asigne los iconos según corresponda.</p>
<p>Empezaremos por los iconos de carpeta abierta o cerrada. Para ello realizaremos una comprobación según si el nodo corresponde a una carpeta, y en tal caso realizaremos una segunda comprobación según si la carpeta está abierta o cerrada (<em>isItemOpen</em>).</p>
<div id="codigo">
<div class="igBar"><span id="lcode-50"><a href="#" onclick="javascript:showPlainTxt('code-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-50">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private function setGeneroIcon<span style="color:#006600; font-weight:bold;">&#40;</span>i:Object<span style="color:#006600; font-weight:bold;">&#41;</span>:Class</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; var isFolder:String = String<span style="color:#006600; font-weight:bold;">&#40;</span>i.@folder<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>isFolder == <span style="color:#CC0000;">"true"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>listadoClabers.<span style="">isItemOpen</span><span style="color:#006600; font-weight:bold;">&#40;</span>i<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico2;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; else</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico1;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>En caso de no tratarse de una carpeta realizaremos la comprobación de la propiedad <em>genero </em>de los nodos y según sea uno u otro colocaremos el icono que le corresponda.</p>
<div id="codigo">
<div class="igBar"><span id="lcode-51"><a href="#" onclick="javascript:showPlainTxt('code-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-51">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">else</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; var genero:String = String<span style="color:#006600; font-weight:bold;">&#40;</span>i.@genero<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>genero == <span style="color:#CC0000;">"M"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico3;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; else if <span style="color:#006600; font-weight:bold;">&#40;</span>genero == <span style="color:#CC0000;">"F"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico4;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; else</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return null;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Script&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<p>NOTA: el icono <strong>ico4 </strong>es un icono nuevo para los clabers mujeres que deberemos haber creado de la misma manera que los vistos anteriormente.</p>
<p>Este es el resultado:</p>
<div align="center"><img src="http://www.cristalab.com/images/tips/flex/TreeIcons/cap_003.jpg" alt="" /></div>
<p>Este es el código completo y el swf funcional:</p>
<div id="codigo">
<div class="igBar"><span id="lcode-52"><a href="#" onclick="javascript:showPlainTxt('code-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-52">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"utf-8"</span>?&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Application xmlns:mx=<span style="color:#CC0000;">"http://www.adobe.com/2006/mxml"</span> layout=<span style="color:#CC0000;">"absolute"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:Script&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico1.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico1:Class;&nbsp;&nbsp;&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico2.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico2:Class;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico3.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico3:Class;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Embed<span style="color:#006600; font-weight:bold;">&#40;</span>source=<span style="color:#CC0000;">"img/ico4.png"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico4:Class;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private function setGeneroIcon<span style="color:#006600; font-weight:bold;">&#40;</span>i:Object<span style="color:#006600; font-weight:bold;">&#41;</span>:Class</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var isFolder:String = String<span style="color:#006600; font-weight:bold;">&#40;</span>i.@folder<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>isFolder == <span style="color:#CC0000;">"true"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>listadoClabers.<span style="">isItemOpen</span><span style="color:#006600; font-weight:bold;">&#40;</span>i<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico2;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico1;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var genero:String = String<span style="color:#006600; font-weight:bold;">&#40;</span>i.@genero<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>genero == <span style="color:#CC0000;">"M"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico3;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if <span style="color:#006600; font-weight:bold;">&#40;</span>genero == <span style="color:#CC0000;">"F"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico4;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return null;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:Script&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:XMLList id=<span style="color:#CC0000;">"listado"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"admin"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"Both"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span> genero=<span style="color:#CC0000;">"F"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"swat"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"pda"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span> genero=<span style="color:#CC0000;">"F"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"claber"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span> genero=<span style="color:#CC0000;">"M"</span>/&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span> genero=<span style="color:#CC0000;">"F"</span>/&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:XMLList&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; folderClosedIcon=<span style="color:#CC0000;">"{ico1}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; folderOpenIcon=<span style="color:#CC0000;">"{ico2}"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; defaultLeafIcon=<span style="color:#CC0000;">"{ico3}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; iconFunction=<span style="color:#CC0000;">"setGeneroIcon"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/mx:Tree&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Application&gt; </div>
</li>
</ol>
</div>
</div>
</div>
</div>
<p></p>
<div align="center"><div align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="" height="">  <param name="movie" value="http://www.cristalab.com/images/tips/flex/TreeIcons/TreeIcons.swf" />  <param name="quality" value="high" /> <embed src="http://www.cristalab.com/images/tips/flex/TreeIcons/TreeIcons.swf" width="" height="" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></div></div>
<p>Related posts:<ol>
<li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Modificar datos en componentes Flex con ItemEditors'>Modificar datos en componentes Flex con ItemEditors</a></li>
<li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Cómo mostrar tooltips dentro de componentes List de Flex'>Cómo mostrar tooltips dentro de componentes List de Flex</a></li>
<li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Personalizar la tipografía en componentes Flex'>Personalizar la tipografía en componentes Flex</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

