<?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>Mon, 31 May 2010 14:58:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>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[Flash Builder 4]]></category>
		<category><![CDATA[Referencia]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[Videotutorial]]></category>
		<category><![CDATA[catalyst]]></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="" 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='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Recursos%20para%20Flash%20Catalyst%20CS5%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F&amp;t=Recursos%20para%20Flash%20Catalyst%20CS5" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F&amp;title=Recursos%20para%20Flash%20Catalyst%20CS5&amp;annotation=%20Entender%20la%20diferencia%3A%20%20dise%C3%B1o%20visual%20vs%20dise%C3%B1o%20interactivo%20%20Welcome%20to%20Flash%20Catalyst%20%282%3A40%29%20%20Las%20mejores%20%20pr%C3%A1cticas%20para%20trabajar%20con%20Flash%20Catalyst%20%20Adobe%20Flash%20Catalyst%20best%20practices%20%20Dise%C3%B1ando%20en%20Flash%20Catalyst%20%20Getting%20started%20with%20Adobe" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F&amp;title=Recursos%20para%20Flash%20Catalyst%20CS5&amp;notes=%20Entender%20la%20diferencia%3A%20%20dise%C3%B1o%20visual%20vs%20dise%C3%B1o%20interactivo%20%20Welcome%20to%20Flash%20Catalyst%20%282%3A40%29%20%20Las%20mejores%20%20pr%C3%A1cticas%20para%20trabajar%20con%20Flash%20Catalyst%20%20Adobe%20Flash%20Catalyst%20best%20practices%20%20Dise%C3%B1ando%20en%20Flash%20Catalyst%20%20Getting%20started%20with%20Adobe" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=Recursos%20para%20Flash%20Catalyst%20CS5&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Frecursos-para-flash-catalyst-cs5%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<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='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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[Noticias]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[eventos]]></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='Permanent Link: Adobe MAX 2009'>Adobe MAX 2009</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-en-vivo-2009-en-su-version-online/' rel='bookmark' title='Permanent Link: 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/url-para-ver-las-conferencias-de-adobe-en-vivo-2009/' rel='bookmark' title='Permanent Link: URL para ver las conferencias de Adobe en Vivo 2009'>URL para ver las conferencias de Adobe en Vivo 2009</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>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Videos%20online%20de%20las%20sesiones%20del%20Adobe%20MAX%202009%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F&amp;t=Videos%20online%20de%20las%20sesiones%20del%20Adobe%20MAX%202009" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F&amp;title=Videos%20online%20de%20las%20sesiones%20del%20Adobe%20MAX%202009&amp;annotation=Como%20ya%20se%20anunci%C3%B3%2C%20para%20los%20que%20no%20hemos%20podido%20asistir%20en%20directo%20a%20las%20conferencias%20del%20Adobe%20MAX%20se%20han%20colocado%20la%20grabaci%C3%B3n%20de%20las%20sesiones%20en%20la%20web%20de%20Adobe.TV.%0D%0A%0D%0A%0D%0A%0D%0AEste%20es%20el%20listado%20completo%2C%20vale%20la%20pena%20ir%20d%C3%A1ndole%20un%20vistazo%3A%0D%0AMAX%202" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F&amp;title=Videos%20online%20de%20las%20sesiones%20del%20Adobe%20MAX%202009&amp;notes=Como%20ya%20se%20anunci%C3%B3%2C%20para%20los%20que%20no%20hemos%20podido%20asistir%20en%20directo%20a%20las%20conferencias%20del%20Adobe%20MAX%20se%20han%20colocado%20la%20grabaci%C3%B3n%20de%20las%20sesiones%20en%20la%20web%20de%20Adobe.TV.%0D%0A%0D%0A%0D%0A%0D%0AEste%20es%20el%20listado%20completo%2C%20vale%20la%20pena%20ir%20d%C3%A1ndole%20un%20vistazo%3A%0D%0AMAX%202" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=Videos%20online%20de%20las%20sesiones%20del%20Adobe%20MAX%202009&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fvideos-online-de-las-sesiones-del-adobe-max-2009%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/adobe-max-2009/' rel='bookmark' title='Permanent Link: Adobe MAX 2009'>Adobe MAX 2009</a></li>
<li><a href='http://www.codigoactionscript.org/adobe-en-vivo-2009-en-su-version-online/' rel='bookmark' title='Permanent Link: 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/url-para-ver-las-conferencias-de-adobe-en-vivo-2009/' rel='bookmark' title='Permanent Link: URL para ver las conferencias de Adobe en Vivo 2009'>URL para ver las conferencias de Adobe en Vivo 2009</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='Permanent Link: 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='Permanent Link: 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/videos-online-de-las-sesiones-del-adobe-max-2009/' rel='bookmark' title='Permanent Link: 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>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>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Curso%20de%20Adobe%20AIR%2C%20online%20y%20gratuito%2C%20en%20Video2brain%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F&amp;t=Curso%20de%20Adobe%20AIR%2C%20online%20y%20gratuito%2C%20en%20Video2brain" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F&amp;title=Curso%20de%20Adobe%20AIR%2C%20online%20y%20gratuito%2C%20en%20Video2brain&amp;annotation=Para%20quienes%20no%20lo%20conozcan%20aun%2C%20Video2brain%20es%20Centro%20de%20formaci%C3%B3n%20autorizado%20de%20Adobe%20que%20ofrece%20cursos%20online%20en%20v%C3%ADdeo%20de%20calidad%20de%20numerosas%20aplicaciones%20de%20Adobe.%20%0D%0A%0D%0AActualmente%20tienen%20disponible%20un%20curso%20de%20Adobe%20AIR%20totalmente%20gratuito%20a%20c" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F&amp;title=Curso%20de%20Adobe%20AIR%2C%20online%20y%20gratuito%2C%20en%20Video2brain&amp;notes=Para%20quienes%20no%20lo%20conozcan%20aun%2C%20Video2brain%20es%20Centro%20de%20formaci%C3%B3n%20autorizado%20de%20Adobe%20que%20ofrece%20cursos%20online%20en%20v%C3%ADdeo%20de%20calidad%20de%20numerosas%20aplicaciones%20de%20Adobe.%20%0D%0A%0D%0AActualmente%20tienen%20disponible%20un%20curso%20de%20Adobe%20AIR%20totalmente%20gratuito%20a%20c" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=Curso%20de%20Adobe%20AIR%2C%20online%20y%20gratuito%2C%20en%20Video2brain&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcurso-de-adobe-air-online-y-gratuito-en-video2brain%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/69/' rel='bookmark' title='Permanent Link: 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='Permanent Link: 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/videos-online-de-las-sesiones-del-adobe-max-2009/' rel='bookmark' title='Permanent Link: 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/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='Permanent Link: 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='Permanent Link: POO: Dependencia de clases y Polimorfismo'>POO: Dependencia de clases y Polimorfismo</a></li>
<li><a href='http://www.codigoactionscript.org/articulo-sobre-la-programacion-orientada-a-objetos-en-actionscript-3/' rel='bookmark' title='Permanent Link: Articulo sobre la programación orientada a objetos en Actionscript 3'>Articulo sobre la programación orientada a objetos 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="syntax_hilite">
<div id="actionscript-23">
<div class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Guillermo <span style="color: #0066CC;">extends</span> Persona</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="syntax_hilite">
<div id="actionscript-24">
<div class="actionscript"><span style="color: #808080; font-style: italic;">//función de la superclase</span><br />
<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><br />
<span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p></p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-25">
<div class="actionscript"><span style="color: #808080; font-style: italic;">//función de la subclase</span><br />
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><br />
<span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-26">
<div class="actionscript"><span style="color: #808080; font-style: italic;">//función de la subclase</span><br />
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><br />
<span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&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>;<br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-27">
<div class="actionscript">package<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> A<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">variable</span>:uint;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">variable</span> = n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p></p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-28">
<div class="actionscript">package <br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> A;</p>
<p>&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<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-29">
<div class="actionscript"><span style="color: #808080; font-style: italic;">//función de la subclase que no permitirá ser sobreescrita</span><br />
<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><br />
<span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-30">
<div class="actionscript">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">interface</span> IGrafico<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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<br />
&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><br />
&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><br />
&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><br />
&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<br />
&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><br />
&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<br />
&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><br />
&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<br />
&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><br />
&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><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-31">
<div class="actionscript">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
&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>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _size:uint;<br />
&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _fill:<span style="color: #0066CC;">Boolean</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _bgColor:uint;<br />
&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _borderSize:uint;<br />
&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> _borderColor:uint;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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;">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;">0</span>, <span style="color: #0066CC;">borderColor</span>:uint = 0x000000<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _size = <span style="color: #0066CC;">size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _fill = fill;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _bgColor = bgColor;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderSize = borderSize;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderColor = <span style="color: #0066CC;">borderColor</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _size;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _size = n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _fill;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _fill = n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _size;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _bgColor = n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _borderSize;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderSize = n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _borderColor;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _borderColor = n;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dibuja<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-32">
<div class="actionscript">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&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>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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;">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;">0</span>, <span style="color: #0066CC;">borderColor</span>:uint = 0x000000<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> <br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_borderSize != <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> <br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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;">0</span>, <span style="color: #cc66cc;">0</span>, _size, _size<span style="color: #66cc66;">&#41;</span>;<br />
&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> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> <br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></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="syntax_hilite">
<div id="actionscript-33">
<div class="actionscript">package org.<span style="color: #006600;">cristalab</span>.<span style="color: #006600;">graphics</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&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>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------</span><br />
&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;">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;">0</span>, bordeColor:uint = 0x000000<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_borderSize != <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&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;">2</span><span style="color: #66cc66;">&#41;</span>;<br />
&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>;<br />
&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> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&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>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></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>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Programaci%C3%B3n%20orientada%20a%20objetos%3A%20Herencia%20de%20clases.%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F&amp;t=Programaci%C3%B3n%20orientada%20a%20objetos%3A%20Herencia%20de%20clases." title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F&amp;title=Programaci%C3%B3n%20orientada%20a%20objetos%3A%20Herencia%20de%20clases.&amp;annotation=La%20herencia%20de%20clases%20es%20uno%20de%20los%20conceptos%20b%C3%A1sicos%20de%20la%20programaci%C3%B3n%20orientada%20a%20objetos.%20Decir%20que%20una%20clase%20hereda%20de%20otra%20quiere%20decir%20que%20esa%20clase%20obtiene%20los%20mismos%20m%C3%A9todos%20y%20propiedades%20de%20la%20otra%20clase.%20Permitiendo%20de%20esta%20forma%20a%C3%B1adi" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F&amp;title=Programaci%C3%B3n%20orientada%20a%20objetos%3A%20Herencia%20de%20clases.&amp;notes=La%20herencia%20de%20clases%20es%20uno%20de%20los%20conceptos%20b%C3%A1sicos%20de%20la%20programaci%C3%B3n%20orientada%20a%20objetos.%20Decir%20que%20una%20clase%20hereda%20de%20otra%20quiere%20decir%20que%20esa%20clase%20obtiene%20los%20mismos%20m%C3%A9todos%20y%20propiedades%20de%20la%20otra%20clase.%20Permitiendo%20de%20esta%20forma%20a%C3%B1adi" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=Programaci%C3%B3n%20orientada%20a%20objetos%3A%20Herencia%20de%20clases.&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fprogramacion-orientada-a-objetos-herencia-de-clases%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/comunicacion-entre-clases-actionscript-3-con-eventdispatcher/' rel='bookmark' title='Permanent Link: 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='Permanent Link: POO: Dependencia de clases y Polimorfismo'>POO: Dependencia de clases y Polimorfismo</a></li>
<li><a href='http://www.codigoactionscript.org/articulo-sobre-la-programacion-orientada-a-objetos-en-actionscript-3/' rel='bookmark' title='Permanent Link: Articulo sobre la programación orientada a objetos en Actionscript 3'>Articulo sobre la programación orientada a objetos 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>



Comparte:


	
	
	
	
	
	
	
	




<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='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=AdobeTV%3A%20Videotutorial%20de%20creacion%20de%20componentes%20en%20Flex%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F&amp;t=AdobeTV%3A%20Videotutorial%20de%20creacion%20de%20componentes%20en%20Flex" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F&amp;title=AdobeTV%3A%20Videotutorial%20de%20creacion%20de%20componentes%20en%20Flex&amp;annotation=Videotutorial%20%22Creating%20New%20Components%20in%20Flex%203%22%20por%20Deepa%20Subramaniam%0D%0A%0D%0A" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F&amp;title=AdobeTV%3A%20Videotutorial%20de%20creacion%20de%20componentes%20en%20Flex&amp;notes=Videotutorial%20%22Creating%20New%20Components%20in%20Flex%203%22%20por%20Deepa%20Subramaniam%0D%0A%0D%0A" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=AdobeTV%3A%20Videotutorial%20de%20creacion%20de%20componentes%20en%20Flex&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fadovetv-videotutorial-de-creacion-de-componentes-en-flex%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/personalizar-la-tipografia-en-componentes-flex/' rel='bookmark' title='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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 tip, 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='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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">tip</a>, 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="syntax_hilite">
<div id="code-46">
<div class="code">&lt;mx:DataGrid <br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:columns&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:DataGridColumn headerText=<span style="color:#CC0000;">"Claber"</span> dataField=<span style="color:#CC0000;">"label"</span>/&gt;<br />
&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; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:DataGridColumn&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;/mx:columns&gt;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&lt;/mx:DataGrid&gt;</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="syntax_hilite">
<div id="code-47">
<div class="code">&lt;mx:DataGrid <br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span> <br />
&nbsp; &nbsp; editable=<span style="color:#CC0000;">"true"</span>&gt;</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="syntax_hilite">
<div id="code-48">
<div class="code">&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>
</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="syntax_hilite">
<div id="code-49">
<div class="code">&lt;mx:columns&gt;<br />
&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;<br />
&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; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:itemEditor&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:itemEditor&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;/mx:DataGridColumn&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&lt;/mx:columns&gt;</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="syntax_hilite">
<div id="code-50">
<div class="code">&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; <br />
&nbsp; &nbsp; &lt;mx:itemRenderer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;<br />
&nbsp; &nbsp; &lt;/mx:itemRenderer&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&lt;/mx:DataGridColumn&gt;</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="syntax_hilite">
<div id="code-51">
<div class="code">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"utf-8"</span>?&gt;<br />
&lt;mx:Application xmlns:mx=<span style="color:#CC0000;">"http://www.adobe.com/2006/mxml"</span><br />
&nbsp; &nbsp; layout=<span style="color:#CC0000;">"absolute"</span>&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:Script&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;<br />
&nbsp; &nbsp; &lt;/mx:Script&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:ArrayCollection id=<span style="color:#CC0000;">"listado"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/mx:ArrayCollection&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:DataGrid <br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; editable=<span style="color:#CC0000;">"true"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:columns&gt;<br />
&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;<br />
&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; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:itemEditor&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:itemEditor&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:DataGridColumn&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:columns&gt;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &lt;/mx:DataGrid&gt;<br />
&nbsp; <br />
&lt;/mx:Application&gt;</div>
</div>
</div>
</div>
<p></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Modificar%20datos%20en%20componentes%20Flex%20con%20ItemEditors%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F&amp;t=Modificar%20datos%20en%20componentes%20Flex%20con%20ItemEditors" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F&amp;title=Modificar%20datos%20en%20componentes%20Flex%20con%20ItemEditors&amp;annotation=En%20este%20%2C%20siguiendo%20un%20poco%20el%20ejemplo%20visto%20en%20el%20%2C%20mostrar%C3%A9%20el%20uso%20de%20e%20para%20mostrar%20y%20editar%20datos%20dentro%20de%20componentes%20basados%20en%20listas%2C%20como%20el%20componente%20%2C%20el%20o%20el%20...%0D%0A%0D%0AComo%20se%20vi%C3%B3%20en%20el%20tip%20anterior%20los%20itemRenderer%20%28y%20los%20itemEditors%29%20n" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F&amp;title=Modificar%20datos%20en%20componentes%20Flex%20con%20ItemEditors&amp;notes=En%20este%20%2C%20siguiendo%20un%20poco%20el%20ejemplo%20visto%20en%20el%20%2C%20mostrar%C3%A9%20el%20uso%20de%20e%20para%20mostrar%20y%20editar%20datos%20dentro%20de%20componentes%20basados%20en%20listas%2C%20como%20el%20componente%20%2C%20el%20o%20el%20...%0D%0A%0D%0AComo%20se%20vi%C3%B3%20en%20el%20tip%20anterior%20los%20itemRenderer%20%28y%20los%20itemEditors%29%20n" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=Modificar%20datos%20en%20componentes%20Flex%20con%20ItemEditors&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fmodificar-datos-en-componentes-flex-con-itemeditors%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/' rel='bookmark' title='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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>2</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 tip 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='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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">tip</a> 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="syntax_hilite">
<div id="code-70">
<div class="code">&lt;mx:XMLList id=<span style="color:#CC0000;">"listado"</span>&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"admin"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"Bofh"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"swat"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"pda"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"claber"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;claber name=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&lt;/mx:XMLList&gt;</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="syntax_hilite">
<div id="code-71">
<div class="code">&lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span><br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span><br />
&nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span>&gt;<br />
&lt;/mx:Tree&gt;</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="syntax_hilite">
<div id="code-72">
<div class="code">&lt;mx:Script&gt;<br />
&nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; private var ico1:Class;&nbsp;&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; private var ico2:Class;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>Bindable<span style="color:#006600; font-weight:bold;">&#93;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; private var ico3:Class;<br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;<br />
&lt;/mx:Script&gt;</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="syntax_hilite">
<div id="code-73">
<div class="code">&lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span><br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span><br />
&nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span><br />
&nbsp; &nbsp; folderClosedIcon=<span style="color:#CC0000;">"{ico1}"</span><br />
&nbsp; &nbsp; folderOpenIcon=<span style="color:#CC0000;">"{ico2}"</span><br />
&nbsp; &nbsp; defaultLeafIcon=<span style="color:#CC0000;">"{ico3}"</span>&gt;<br />
&lt;/mx:Tree&gt;</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="syntax_hilite">
<div id="code-74">
<div class="code">&lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span><br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span><br />
&nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span><br />
&nbsp; &nbsp; iconFunction=<span style="color:#CC0000;">"setGeneroIcon"</span>&gt;<br />
&lt;/mx:Tree&gt;</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="syntax_hilite">
<div id="code-75">
<div class="code">&lt;mx:XMLList id=<span style="color:#CC0000;">"listado"</span>&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"admin"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"Both"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&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;<br />
&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;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"swat"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&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;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"pda"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"claber"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&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;<br />
&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;<br />
&nbsp; &nbsp; &lt;/group&gt;<br />
&lt;/mx:XMLList&gt;</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="syntax_hilite">
<div id="code-76">
<div class="code">private function setGeneroIcon<span style="color:#006600; font-weight:bold;">&#40;</span>i:Object<span style="color:#006600; font-weight:bold;">&#41;</span>:Class<br />
<span style="color:#006600; font-weight:bold;">&#123;</span><br />
&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; <br />
&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><br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></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="syntax_hilite">
<div id="code-77">
<div class="code">else<br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&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>;<br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico3;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico4;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
<span style="color:#006600; font-weight:bold;">&#125;</span><br />
<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;<br />
&lt;/mx:Script&gt;</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="syntax_hilite">
<div id="code-78">
<div class="code">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"utf-8"</span>?&gt;<br />
&lt;mx:Application xmlns:mx=<span style="color:#CC0000;">"http://www.adobe.com/2006/mxml"</span> layout=<span style="color:#CC0000;">"absolute"</span>&gt;</p>
<p>&nbsp; &nbsp; &lt;mx:Script&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span><br />
&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><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico1:Class;&nbsp;&nbsp;&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&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><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico2:Class;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&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><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico3:Class;</p>
<p>&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><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var ico4:Class;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&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<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&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; <br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&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>;<br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico3;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&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><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ico4;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;<br />
&nbsp; &nbsp; &lt;/mx:Script&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:XMLList id=<span style="color:#CC0000;">"listado"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"admin"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"Both"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&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;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"swat"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"pda"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;group name=<span style="color:#CC0000;">"claber"</span> folder=<span style="color:#CC0000;">"true"</span>&gt;<br />
&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;<br />
&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;<br />
&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;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/group&gt;<br />
&nbsp; &nbsp; &lt;/mx:XMLList&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:Tree id=<span style="color:#CC0000;">"listadoClabers"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; dataProvider=<span style="color:#CC0000;">"{listado}"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; labelField=<span style="color:#CC0000;">"@name"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; folderClosedIcon=<span style="color:#CC0000;">"{ico1}"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; folderOpenIcon=<span style="color:#CC0000;">"{ico2}"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; defaultLeafIcon=<span style="color:#CC0000;">"{ico3}"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; iconFunction=<span style="color:#CC0000;">"setGeneroIcon"</span>&gt;<br />
&nbsp; &nbsp; &lt;/mx:Tree&gt;<br />
&nbsp; &nbsp; <br />
&lt;/mx:Application&gt;</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>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=C%C3%B3mo%20personalizar%20los%20iconos%20en%20componentes%20Tree%20de%20Flex%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F&amp;t=C%C3%B3mo%20personalizar%20los%20iconos%20en%20componentes%20Tree%20de%20Flex" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F&amp;title=C%C3%B3mo%20personalizar%20los%20iconos%20en%20componentes%20Tree%20de%20Flex&amp;annotation=En%20este%20%20mostrar%C3%A9%20como%20podemos%20personalizar%20los%20iconos%20de%20las%20carpetas%20y%20de%20los%20objetos%20que%20se%20visualizan%20en%20un%20componente%20Tree%20en%20.%0D%0A%0D%0APara%20empezar%20veremos%20que%20autom%C3%A1ticamente%20Flex%20coloca%20unos%20iconos%20por%20defecto%20al%20visualizar%20un%20componente%20Tree.%20U" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F&amp;title=C%C3%B3mo%20personalizar%20los%20iconos%20en%20componentes%20Tree%20de%20Flex&amp;notes=En%20este%20%20mostrar%C3%A9%20como%20podemos%20personalizar%20los%20iconos%20de%20las%20carpetas%20y%20de%20los%20objetos%20que%20se%20visualizan%20en%20un%20componente%20Tree%20en%20.%0D%0A%0D%0APara%20empezar%20veremos%20que%20autom%C3%A1ticamente%20Flex%20coloca%20unos%20iconos%20por%20defecto%20al%20visualizar%20un%20componente%20Tree.%20U" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=C%C3%B3mo%20personalizar%20los%20iconos%20en%20componentes%20Tree%20de%20Flex&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-personalizar-los-iconos-en-componentes-tree-de-flex%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Permanent Link: 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='Permanent Link: 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='Permanent Link: 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>
		<item>
		<title>Cómo mostrar tooltips dentro de componentes List de Flex</title>
		<link>http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/</link>
		<comments>http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 00:13:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.codigoactionscript.org/?p=119</guid>
		<description><![CDATA[<p>Este es un tip muy sencillito que consiste en cómo añadir tooltips a cada uno de los elementos de un componente List en Flex.</p>
<p>Primero de todo supongamos que tenemos un compomente list en nuestra aplicación que nos muestra un listado. En este caso tenemos un listado de usuarios de Clab dentro de un Array registrando el nombre y el clablevel.</p>



&#60;mx:List id="listado"
&#160; &#160; horizontalCenter="0" verticalCenter="0" 
&#160; &#160; width="200" height="200"&#62;
&#160; &#160; 
&#160; &#160; &#60;mx:dataProvider&#62;
&#160; &#160; &#60;mx:Array&#62;
&#160; &#160; &#160; &#160; &#160; &#160; &#60;mx:Object label="Freddie" level="43458"/&#62;
&#160; &#160; &#160; &#160; &#160; &#160; &#60;mx:Object label="Elecash" level="7289"/&#62;
&#160; [...]


Related posts:<ol><li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Permanent Link: Modificar datos en componentes Flex con ItemEditors'>Modificar datos en componentes Flex con ItemEditors</a></li>
<li><a href='http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/' rel='bookmark' title='Permanent Link: 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/cargar-xml-en-un-componente-list-en-actionscript-3/' rel='bookmark' title='Permanent Link: Cargar XML en un componente List en Actionscript 3'>Cargar XML en un componente List en Actionscript 3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Este es un <a href="http://www.cristalab.com/tips">tip</a> muy sencillito que consiste en cómo añadir <strong>tooltips </strong>a cada uno de los elementos de un componente List en <a href="http://www.cristalab.com/tips/tags/flex">Flex</a>.</p>
<p>Primero de todo supongamos que tenemos un compomente list en nuestra aplicación que nos muestra un listado. En este caso tenemos un listado de usuarios de Clab dentro de un Array registrando el nombre y el clablevel.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="code-91">
<div class="code">&lt;mx:List id=<span style="color:#CC0000;">"listado"</span><br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span>&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:dataProvider&gt;<br />
&nbsp; &nbsp; &lt;mx:Array&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Array&gt;<br />
&nbsp; &nbsp; &lt;/mx:dataProvider&gt;&nbsp; <br />
&lt;/mx:List&gt;</div>
</div>
</div>
</div>
<p></p>
<p>En este punto el componente List nos muestra los nombres que corresponden al parámetro "label" de los objetos del Array.</p>
<p>Ahora queremos que al pasar el cursor sobre los nombres nos muestre el valor del parámetro "level" a modo de tooltip. Para realizar esto añadiremos el parámetro <strong>showDataTips </strong>y <strong>showDataTips </strong>al componente List..</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="code-92">
<div class="code">&lt;mx:List id=<span style="color:#CC0000;">"listado"</span><br />
&nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span><br />
&nbsp; &nbsp; showDataTips=<span style="color:#CC0000;">"true"</span><br />
&nbsp; &nbsp; dataTipFunction=<span style="color:#CC0000;">"showTip"</span>&gt;</div>
</div>
</div>
</div>
<p></p>
<p>La función showTip asignada al parámetro dataTipFunction es la definirá el contenido del tooltip a mostrar según cada objeto del Array.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="code-93">
<div class="code">&lt;mx:Script&gt;<br />
&nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; public function showTip<span style="color:#006600; font-weight:bold;">&#40;</span>i:Object<span style="color:#006600; font-weight:bold;">&#41;</span>:String<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return i.<span style="">level</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;<br />
&lt;/mx:Script&gt;</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/listToolTips/ToolTips1.swf" />  <param name="quality" value="high" /> <embed src="http://www.cristalab.com/images/tips/flex/listToolTips/ToolTips1.swf" width="" height="" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></div></div>
<p>El inconveniente de este sistema es que el tooltip se situa sobre la misma linea del item al que se le hace rollover. Si no nos interesa esto y queremos que el tooltip quede situado al lado del cursor deberemos utilizar otro sistema, la clase <strong>ToolTipManager</strong>.</p>
<p>Para utilizar la clase <strong>ToolTipManager </strong>tendremos que utilizar un <strong>itemRenderer </strong>que sea el que muestre los elementos del componente List.</p>
<p>Este será nuestro itemRenderer, un simple label:</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="code-94">
<div class="code">&lt;mx:itemRenderer&gt;<br />
&nbsp; &nbsp; &lt;mx:Component&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Label text=<span style="color:#CC0000;">"{data.label}"</span> toolTip=<span style="color:#CC0000;">"{data.level}"</span>/&gt;<br />
&nbsp; &nbsp; &lt;/mx:Component&gt;<br />
&lt;/mx:itemRenderer&gt;</div>
</div>
</div>
</div>
<p></p>
<p>Aqui directamente definimos el tooltip directamente al Label, visualizándose directamente para todos los elementos del listado. Permitiendonos utilizar todas las caráteristicas que nos permite la clase <strong>ToolTipManager</strong>. En este caso eliminaremos la función <strong>showTip </strong>ya que aqui no la estamos utilizando.</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/listToolTips/ToolTips2.swf" />  <param name="quality" value="high" /> <embed src="http://www.cristalab.com/images/tips/flex/listToolTips/ToolTips2.swf" width="" height="" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></div></div>
<p>Los códigos completos de las dos versiones serían estos:</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="code-95">
<div class="code">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"utf-8"</span>?&gt;<br />
&lt;mx:Application xmlns:mx=<span style="color:#CC0000;">"http://www.adobe.com/2006/mxml"</span> layout=<span style="color:#CC0000;">"absolute"</span>&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;mx:Script&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!<span style="color:#006600; font-weight:bold;">&#91;</span>CDATA<span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public function showTip<span style="color:#006600; font-weight:bold;">&#40;</span>i:Object<span style="color:#006600; font-weight:bold;">&#41;</span>:String<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return i.<span style="">level</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt;<br />
&nbsp; &nbsp; &lt;/mx:Script&gt;</p>
<p>&nbsp; &nbsp; &lt;mx:List id=<span style="color:#CC0000;">"listado"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; showDataTips=<span style="color:#CC0000;">"true"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dataTipFunction=<span style="color:#CC0000;">"showTip"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:dataProvider&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Array&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Array&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:dataProvider&gt;&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;/mx:List&gt;&nbsp; <br />
&lt;/mx:Application&gt;</div>
</div>
</div>
</div>
<p></p>
<div id="codigo">
<div class="syntax_hilite">
<div id="code-96">
<div class="code">&lt;?xml version=<span style="color:#CC0000;">"1.0"</span> encoding=<span style="color:#CC0000;">"utf-8"</span>?&gt;<br />
&lt;mx:Application xmlns:mx=<span style="color:#CC0000;">"http://www.adobe.com/2006/mxml"</span> layout=<span style="color:#CC0000;">"absolute"</span>&gt;</p>
<p>&nbsp; &nbsp; &lt;mx:List id=<span style="color:#CC0000;">"listado"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; verticalCenter=<span style="color:#CC0000;">"0"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; width=<span style="color:#CC0000;">"200"</span> height=<span style="color:#CC0000;">"200"</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:itemRenderer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Component&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Label text=<span style="color:#CC0000;">"{data.label}"</span> toolTip=<span style="color:#CC0000;">"{data.level}"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Component&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:itemRenderer&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:dataProvider&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Array&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Freddie"</span> level=<span style="color:#CC0000;">"43458"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Elecash"</span> level=<span style="color:#CC0000;">"7289"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"_Conejo"</span> level=<span style="color:#CC0000;">"7203"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"XKlibur"</span> level=<span style="color:#CC0000;">"4713"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zguillez"</span> level=<span style="color:#CC0000;">"4120"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Eldervaz"</span> level=<span style="color:#CC0000;">"3123"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Mariux"</span> level=<span style="color:#CC0000;">"2921"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Zah"</span> level=<span style="color:#CC0000;">"2906"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Bleend"</span> level=<span style="color:#CC0000;">"2016"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:Object label=<span style="color:#CC0000;">"Carmen Vivas"</span> level=<span style="color:#CC0000;">"610"</span>/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:Array&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/mx:dataProvider&gt;&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;/mx:List&gt;&nbsp; <br />
&lt;/mx:Application&gt;</div>
</div>
</div>
</div>
<p></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=C%C3%B3mo%20mostrar%20tooltips%20dentro%20de%20componentes%20List%20de%20Flex%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F&amp;t=C%C3%B3mo%20mostrar%20tooltips%20dentro%20de%20componentes%20List%20de%20Flex" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F&amp;title=C%C3%B3mo%20mostrar%20tooltips%20dentro%20de%20componentes%20List%20de%20Flex&amp;annotation=Este%20es%20un%20%20muy%20sencillito%20que%20consiste%20en%20c%C3%B3mo%20a%C3%B1adir%20a%20cada%20uno%20de%20los%20elementos%20de%20un%20componente%20List%20en%20.%0D%0A%0D%0APrimero%20de%20todo%20supongamos%20que%20tenemos%20un%20compomente%20list%20en%20nuestra%20aplicaci%C3%B3n%20que%20nos%20muestra%20un%20listado.%20En%20este%20caso%20tenemos%20un%20li" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F&amp;title=C%C3%B3mo%20mostrar%20tooltips%20dentro%20de%20componentes%20List%20de%20Flex&amp;notes=Este%20es%20un%20%20muy%20sencillito%20que%20consiste%20en%20c%C3%B3mo%20a%C3%B1adir%20a%20cada%20uno%20de%20los%20elementos%20de%20un%20componente%20List%20en%20.%0D%0A%0D%0APrimero%20de%20todo%20supongamos%20que%20tenemos%20un%20compomente%20list%20en%20nuestra%20aplicaci%C3%B3n%20que%20nos%20muestra%20un%20listado.%20En%20este%20caso%20tenemos%20un%20li" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=C%C3%B3mo%20mostrar%20tooltips%20dentro%20de%20componentes%20List%20de%20Flex&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fcomo-mostrar-tooltips-dentro-de-componentes-list-de-flex%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/modificar-datos-en-componentes-flex-con-itemeditors/' rel='bookmark' title='Permanent Link: Modificar datos en componentes Flex con ItemEditors'>Modificar datos en componentes Flex con ItemEditors</a></li>
<li><a href='http://www.codigoactionscript.org/como-personalizar-los-iconos-en-componentes-tree-de-flex/' rel='bookmark' title='Permanent Link: 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/cargar-xml-en-un-componente-list-en-actionscript-3/' rel='bookmark' title='Permanent Link: Cargar XML en un componente List en Actionscript 3'>Cargar XML en un componente List en Actionscript 3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/como-mostrar-tooltips-dentro-de-componentes-list-de-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Añadir funciones al teclado con Actionscript 3</title>
		<link>http://www.codigoactionscript.org/anadir-funciones-al-teclado-con-actionscript-3/</link>
		<comments>http://www.codigoactionscript.org/anadir-funciones-al-teclado-con-actionscript-3/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 22:50:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Avanzado]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Trucos]]></category>
		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.codigo.as/blog/?p=113</guid>
		<description><![CDATA[<p>Esta es una sencilla clase que nos permitirá de forma fácil añadir la ejecución de una función al presionar una determinada tecla del teclado.</p>
<p>para ello crearemos una clase "Teclado" y la colocaremos en nuestro package de clases de actionscript 3.</p>
<p>La clase la extenderemos de EventDispatcher para poder lanzar eventos desde ella, y la escribiremos siguiendo un patrón Singleton ya que solo nos interesa tener un único controlador del teclado y queremos tener acceso global a él.</p>



package com.zguillez.events
&#123;
public class Teclado extends EventDispatcher
&#123;
public static&#160; var _instancia:Teclado;
//-------------------------------------------
public function Teclado&#40;s:Singleton,clip&#41; &#123;&#125;
//-------------------------------------------
public static function getInstancia&#40;clip:MovieClip&#41;:Teclado
&#123;
if [...]


Related posts:<ol><li><a href='http://www.codigoactionscript.org/comunicacion-entre-clases-actionscript-3-con-eventdispatcher/' rel='bookmark' title='Permanent Link: 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/clase-de-actionscript-3-para-retardar-la-ejecucion-de-funciones/' rel='bookmark' title='Permanent Link: Clase de ActionScript 3 para retardar la ejecución de funciones'>Clase de ActionScript 3 para retardar la ejecución de funciones</a></li>
<li><a href='http://www.codigoactionscript.org/37/' rel='bookmark' title='Permanent Link: Movimiento de MovieClips con el teclado'>Movimiento de MovieClips con el teclado</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Esta es una sencilla clase que nos permitirá de forma fácil añadir la ejecución de una función al presionar una determinada tecla del teclado.</p>
<p>para ello crearemos una clase "Teclado" y la colocaremos en nuestro package de clases de <a href="http://www.cristalab.com/tips/tags/actionscript">actionscript 3</a>.</p>
<p>La clase la extenderemos de <strong>EventDispatcher </strong>para poder lanzar eventos desde ella, y la escribiremos siguiendo un <a href="http://es.wikipedia.org/wiki/Singleton">patrón Singleton</a> ya que solo nos interesa tener un único controlador del teclado y queremos tener acceso global a él.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-109">
<div class="actionscript">package com.<span style="color: #006600;">zguillez</span>.<span style="color: #006600;">events</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Teclado <span style="color: #0066CC;">extends</span> EventDispatcher<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span>&nbsp; <span style="color: #000000; font-weight: bold;">var</span> _instancia:Teclado;<br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Teclado<span style="color: #66cc66;">&#40;</span>s:Singleton,clip<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getInstancia<span style="color: #66cc66;">&#40;</span>clip:<span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#41;</span>:Teclado<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_instancia == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_instancia = <span style="color: #000000; font-weight: bold;">new</span> Teclado<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Singleton<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,clip<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">return</span> _instancia;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-----------------------------------------</span><br />
<span style="color: #000000; font-weight: bold;">class</span> Singleton <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p>
En la función getInstancia que es la que nos creará la instancia de la clase y nos dará acceso global a ella le pasaremos como parámetro el clip al que asignaremos el listener para el teclado. Ese clip lo registraremos en el constructor de la clase de igual manera que crearemos dos arrays uno para guardar las teclas a las que hemos asignado una función y otro para guardar referencia a esas funciones.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-110">
<div class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Teclado<span style="color: #66cc66;">&#40;</span>s:Singleton,clip<span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_clip = clip;<br />
_funciones = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
_teclas = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
_clip.<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p>
Ahora crearemos una función publica con la que registraremos las teclas con sus respectivas funciones a ejecutar.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-111">
<div class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addTecla<span style="color: #66cc66;">&#40;</span>n:uint, f:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_teclas.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>n<span style="color: #66cc66;">&#41;</span>;<br />
_funciones.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>f<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p>
Solo nos queda escribir la función <strong>onKeyDown</strong> que es la que se ejecuará al presionar una tecla del teclado. Esta función comprobará si la tecla presionada está dentro de la lista de teclas con una función asignada, y de ser así ejecutará dicha función.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-112">
<div class="actionscript"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#40;</span>tecla:KeyboardEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> total:uint = _teclas.<span style="color: #0066CC;">length</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>total&amp;gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i &amp;lt;total ; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>tecla.<span style="color: #006600;">keyCode</span> == _teclas<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_funciones<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span>tecla.<span style="color: #006600;">keyCode</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
_tecla = tecla.<span style="color: #006600;">keyCode</span>;<br />
dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span>Teclado.<span style="color: #006600;">KEY_PRESS</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p>
De más a más, Le añadiremos un <strong>dispatchEvent</strong> por si nos interesase detectar desde fuera de la clase el hecho de haber presionado una tecla. En la variable <em>_tecla</em> guaremos referncia del código de la última tecla presionada para acceder a ella al escuchar el dispatch. Deberemos crearnos un <em>getter</em> para esa variable.</p>
<p>Para utilizar esta clase, en nuestra pelicula FLA colocaremos esto:</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-113">
<div class="actionscript"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">zguillez</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">Teclado</span>;</p>
<p><span style="color: #000000; font-weight: bold;">var</span> teclado:Teclado = Teclado.<span style="color: #006600;">getInstancia</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;<br />
teclado.<span style="color: #006600;">addTecla</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">70</span>,traceTecla<span style="color: #66cc66;">&#41;</span>;<br />
teclado.<span style="color: #006600;">addTecla</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">71</span>,traceTecla<span style="color: #66cc66;">&#41;</span>;<br />
teclado.<span style="color: #006600;">addTecla</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">72</span>,traceTecla<span style="color: #66cc66;">&#41;</span>;</p>
<p><span style="color: #000000; font-weight: bold;">function</span> traceTecla<span style="color: #66cc66;">&#40;</span>keycode<span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Presioné la tecla "</span> + keycode<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p>
Con esto haremos que al presionar la tecla con los keyCodes 70, 71 y 72 (las teclas F,G y H) se ejecute la función <strong>traceTecla </strong>(aunque podíamos haber asignado una función diferente a cada tecla).</p>
<p>Hay que fijarse que las funciones que queramos asignar han de recibir como parámetro el keyCode de la tecla (esto lo podemos omitir al ejecutar la función desde la clase, pero siempre va bien saber el keyCode que te ejecuta la función, sobretodo en funciones que son ejecutadas por varias teclas como en este caso).</p>
<p>Así que la clase completa queda asi:</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-114">
<div class="actionscript">package com.<span style="color: #006600;">zguillez</span>.<span style="color: #006600;">events</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">Stage</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">KeyboardEvent</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;<br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Teclado <span style="color: #0066CC;">extends</span> EventDispatcher<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span>&nbsp; <span style="color: #000000; font-weight: bold;">var</span> _instancia:Teclado;<br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span>&nbsp; <span style="color: #000000; font-weight: bold;">var</span> KEY_PRESS:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">"onKeyPress"</span>;<br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _clip:<span style="color: #0066CC;">MovieClip</span>;<br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _funciones:<span style="color: #0066CC;">Array</span>;<br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _teclas:<span style="color: #0066CC;">Array</span>;<br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _tecla:uint;<br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Teclado<span style="color: #66cc66;">&#40;</span>s:Singleton,clip<span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_clip = clip;<br />
_funciones = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
_teclas = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
_clip.<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getInstancia<span style="color: #66cc66;">&#40;</span>clip:<span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#41;</span>:Teclado<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_instancia == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
_instancia = <span style="color: #000000; font-weight: bold;">new</span> Teclado<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Singleton<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,clip<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">return</span> _instancia;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-----------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addTecla<span style="color: #66cc66;">&#40;</span>n:uint, f:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_teclas.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>n<span style="color: #66cc66;">&#41;</span>;<br />
_funciones.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>f<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#40;</span>tecla:KeyboardEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> total:uint = _teclas.<span style="color: #0066CC;">length</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>total&amp;gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint = <span style="color: #cc66cc;">0</span>; i &amp;lt;total ; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>tecla.<span style="color: #006600;">keyCode</span> == _teclas<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
_funciones<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span>tecla.<span style="color: #006600;">keyCode</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
_tecla = tecla.<span style="color: #006600;">keyCode</span>;<br />
dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span>Teclado.<span style="color: #006600;">KEY_PRESS</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> tecla<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:uint<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">return</span> _tecla;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-------------------------------------------</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">//-----------------------------------------</span><br />
<span style="color: #000000; font-weight: bold;">class</span> Singleton<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=A%C3%B1adir%20funciones%20al%20teclado%20con%20Actionscript%203%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F&amp;t=A%C3%B1adir%20funciones%20al%20teclado%20con%20Actionscript%203" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F&amp;title=A%C3%B1adir%20funciones%20al%20teclado%20con%20Actionscript%203&amp;annotation=Esta%20es%20una%20sencilla%20clase%20que%20nos%20permitir%C3%A1%20de%20forma%20f%C3%A1cil%20a%C3%B1adir%20la%20ejecuci%C3%B3n%20de%20una%20funci%C3%B3n%20al%20presionar%20una%20determinada%20tecla%20del%20teclado.%0D%0A%0D%0Apara%20ello%20crearemos%20una%20clase%20%22Teclado%22%20y%20la%20colocaremos%20en%20nuestro%20package%20de%20clases%20de%20.%0D%0A%0D%0ALa%20cl" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F&amp;title=A%C3%B1adir%20funciones%20al%20teclado%20con%20Actionscript%203&amp;notes=Esta%20es%20una%20sencilla%20clase%20que%20nos%20permitir%C3%A1%20de%20forma%20f%C3%A1cil%20a%C3%B1adir%20la%20ejecuci%C3%B3n%20de%20una%20funci%C3%B3n%20al%20presionar%20una%20determinada%20tecla%20del%20teclado.%0D%0A%0D%0Apara%20ello%20crearemos%20una%20clase%20%22Teclado%22%20y%20la%20colocaremos%20en%20nuestro%20package%20de%20clases%20de%20.%0D%0A%0D%0ALa%20cl" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=A%C3%B1adir%20funciones%20al%20teclado%20con%20Actionscript%203&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fanadir-funciones-al-teclado-con-actionscript-3%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/comunicacion-entre-clases-actionscript-3-con-eventdispatcher/' rel='bookmark' title='Permanent Link: 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/clase-de-actionscript-3-para-retardar-la-ejecucion-de-funciones/' rel='bookmark' title='Permanent Link: Clase de ActionScript 3 para retardar la ejecución de funciones'>Clase de ActionScript 3 para retardar la ejecución de funciones</a></li>
<li><a href='http://www.codigoactionscript.org/37/' rel='bookmark' title='Permanent Link: Movimiento de MovieClips con el teclado'>Movimiento de MovieClips con el teclado</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/anadir-funciones-al-teclado-con-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Manejo de MovieClips con ActionScript 3</title>
		<link>http://www.codigoactionscript.org/manejo-de-movieclips-con-actionscript-3/</link>
		<comments>http://www.codigoactionscript.org/manejo-de-movieclips-con-actionscript-3/#comments</comments>
		<pubDate>Fri, 25 May 2007 16:41:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Básico]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.codigo.as/blog/?p=76</guid>
		<description><![CDATA[<p>Este es un Tip muy sencillo pero que trae de cabeza a la gente que empieza con ActionScript 3, así que lo escribo para intentar aclarar un poco cuál es el sistema de añadir a nuestra película MovieClips que estén situados dentro de nuestra biblioteca y empezar a montar nuestra película.</p>
<p>Como ya se dijo en otro tip, el sistema de añadir elementos de la biblioteca a cambiado en AS3. Ahora attachMovie no funciona, añadimos los clips con addChild y para realizar este proceso hemos de crear una clase para cada [...]


Related posts:<ol><li><a href='http://www.codigoactionscript.org/acceder-a-funciones-en-movieclips-de-peliculas-swf-externas/' rel='bookmark' title='Permanent Link: Acceder a funciones en MovieClips de películas .swf externas'>Acceder a funciones en MovieClips de películas .swf externas</a></li>
<li><a href='http://www.codigoactionscript.org/como-duplicar-movieclips-con-graficos-en-actionscript-3/' rel='bookmark' title='Permanent Link: Cómo duplicar MovieClips con gráficos en ActionScript 3'>Cómo duplicar MovieClips con gráficos en ActionScript 3</a></li>
<li><a href='http://www.codigoactionscript.org/clase-de-actionscript-3-para-anadir-sombras-a-movieclips/' rel='bookmark' title='Permanent Link: Clase de ActionScript 3 para añadir sombras a MovieClips'>Clase de ActionScript 3 para añadir sombras a MovieClips</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Este es un Tip muy sencillo pero que trae de cabeza a la gente que empieza con ActionScript 3, así que lo escribo para intentar aclarar un poco cuál es el sistema de añadir a nuestra película MovieClips que estén situados dentro de nuestra biblioteca y empezar a montar nuestra película.</p>
<p>Como ya se dijo en <a href="http://www.codigo.as/blog/?p=31">otro tip</a>, el sistema de añadir elementos de la biblioteca a cambiado en AS3. Ahora <strong>attachMovie</strong> no funciona, añadimos los clips con <strong>addChild</strong> y para realizar este proceso hemos de crear una clase para cada clip que queramos añadir.<br />
<strong><br />
Este es el proceso a seguir:</strong></p>
<p>Primero crearemos el MovieClip y lo tendremos en la biblioteca.</p>
<p><img src="http://www.zguillez.com/images/codigoas/76/1.png" alt="img" /></p>
<p>Abriremos las propiedades del MovieClip y en las opciones de linkage seleccionaremos "exportar para actionscrip" y le daremos un nombre para la clase.</p>
<p><img src="http://www.zguillez.com/images/codigoas/76/2.png" alt="img" /></p>
<p>Como podemos ver, ahora en AS3 hemos de vincular el MovieClip a una clase, NO darle un nombre de identificador como hacíamos en AS2.</p>
<p>NOTA: Si intentásemos añadir un nombre de identificador al MovieClip no aparecería una advertencia indicándonos que ese proceso solo es para AS2 y nos preguntara si queremos cambiar las opciones de publicación.</p>
<p><img src="http://www.zguillez.com/images/codigoas/76/3.png" alt="img" /></p>
<p>Ahora para añadir este MovieClip a nuestra película hemos de crear una instancia de esa clase</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-121">
<div class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> clip1:clipA = <span style="color: #000000; font-weight: bold;">new</span> clipA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</div>
</div>
</div>
<p></p>
<p>Y la situaremos en el stage con addChild</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-122">
<div class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> clip1:clipA = <span style="color: #000000; font-weight: bold;">new</span> clipA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
clip1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">100</span>;<br />
clip1.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">100</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span>clip1<span style="color: #66cc66;">&#41;</span>;</div>
</div>
</div>
</div>
<p></p>
<p>Y listo!</p>
<p><img src="http://www.zguillez.com/images/codigoas/76/4.png" alt="img" /></p>
<p>Ahora si quisiésemos añadirle algún tipo de interactividad a este MovieClip, como por ejemplo añadirle un evento de click, no colocaríamos el código en el .fla cómo haríamos en AS1 o AS2 sino que crearemos un archivo .as con el nombre de la clase que le indicamos al MovieClip y ahí escribiremos todo el código necesario para manejar este MovieClip.</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-123">
<div class="actionscript">package <br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;<br />
&nbsp; &nbsp;<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> clipA <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> clipA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;addEventListener<span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_DOWN</span>, mouse_down<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> mouse_down<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"CLICK!"</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p></p>
<p>En AS3 es recomendable trabajar con clases y colocar el menos código posible sobre la línea de tiempo con lo que este código lo podíamos meter dentro de una clase Main.as</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-124">
<div class="actionscript">package <br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_root</span>:<span style="color: #0066CC;">MovieClip</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> clip1:clipA = <span style="color: #000000; font-weight: bold;">new</span> clipA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span>ruta:<span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">_root</span> = ruta;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clip1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">100</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clip1.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">100</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">_root</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>clip1<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p></p>
<p>Al constructor de la clase le pasaremos como parámetro la ruta de la línea de tiempo principal (el _root).</p>
<p>Este sería el único código de nuestro .fla</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-125">
<div class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_root</span>:Main = <span style="color: #000000; font-weight: bold;">new</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;</div>
</div>
</div>
</div>
<p></p>
<p>Esta clase Main también la podíamos haber instanciado desde el panel de propiedades de la película</p>
<p><img src="http://www.zguillez.com/images/codigoas/76/6.png" alt="img" /></p>
<p>De esta manera no es necesario introducir ningún código dentro de nuestro .fla, y tampoco es necesario pararle ningún parámetro ya que en este caso el this ya hace referencia a la línea de tiempo principal, por lo que la clase Main quedaría así:</p>
<div id="codigo">
<div class="syntax_hilite">
<div id="actionscript-126">
<div class="actionscript">package <br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;<br />
&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_root</span>:<span style="color: #0066CC;">MovieClip</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> clip1:clipA = <span style="color: #000000; font-weight: bold;">new</span> clipA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">_root</span> = <span style="color: #0066CC;">this</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clip1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">100</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clip1.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">100</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">_root</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>clip1<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
</div>
<p></p>
<p>A partir de aquí iremos ampliando la clase Main y iremos añadiendo más clases y subclases para construir nuestra película.</p>
<p>Espero haber aclarado alguna duda <img src='http://www.codigoactionscript.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparte:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F" title="Meneame"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Manejo%20de%20MovieClips%20con%20ActionScript%203%20-%20http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F" title="Twitter"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F&amp;t=Manejo%20de%20MovieClips%20con%20ActionScript%203" title="Facebook"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F&amp;title=Manejo%20de%20MovieClips%20con%20ActionScript%203&amp;annotation=Este%20es%20un%20Tip%20muy%20sencillo%20pero%20que%20trae%20de%20cabeza%20a%20la%20gente%20que%20empieza%20con%20ActionScript%203%2C%20as%C3%AD%20que%20lo%20escribo%20para%20intentar%20aclarar%20un%20poco%20cu%C3%A1l%20es%20el%20sistema%20de%20a%C3%B1adir%20a%20nuestra%20pel%C3%ADcula%20MovieClips%20que%20est%C3%A9n%20situados%20dentro%20de%20nuestra%20bibli" title="Google Bookmarks"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F&amp;title=Manejo%20de%20MovieClips%20con%20ActionScript%203&amp;notes=Este%20es%20un%20Tip%20muy%20sencillo%20pero%20que%20trae%20de%20cabeza%20a%20la%20gente%20que%20empieza%20con%20ActionScript%203%2C%20as%C3%AD%20que%20lo%20escribo%20para%20intentar%20aclarar%20un%20poco%20cu%C3%A1l%20es%20el%20sistema%20de%20a%C3%B1adir%20a%20nuestra%20pel%C3%ADcula%20MovieClips%20que%20est%C3%A9n%20situados%20dentro%20de%20nuestra%20bibli" title="del.icio.us"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F" title="Technorati"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=Manejo%20de%20MovieClips%20con%20ActionScript%203&amp;body=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F" title="email"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.codigoactionscript.org%2Fmanejo-de-movieclips-con-actionscript-3%2F&amp;partner=sociable" title="Print"><img src="http://www.codigoactionscript.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://www.codigoactionscript.org/acceder-a-funciones-en-movieclips-de-peliculas-swf-externas/' rel='bookmark' title='Permanent Link: Acceder a funciones en MovieClips de películas .swf externas'>Acceder a funciones en MovieClips de películas .swf externas</a></li>
<li><a href='http://www.codigoactionscript.org/como-duplicar-movieclips-con-graficos-en-actionscript-3/' rel='bookmark' title='Permanent Link: Cómo duplicar MovieClips con gráficos en ActionScript 3'>Cómo duplicar MovieClips con gráficos en ActionScript 3</a></li>
<li><a href='http://www.codigoactionscript.org/clase-de-actionscript-3-para-anadir-sombras-a-movieclips/' rel='bookmark' title='Permanent Link: Clase de ActionScript 3 para añadir sombras a MovieClips'>Clase de ActionScript 3 para añadir sombras a MovieClips</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codigoactionscript.org/manejo-de-movieclips-con-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
