<?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>Blog de Jorge Machín &#187; Adobe Flash</title>
	<atom:link href="http://www.machin.com.mx/archives/category/adobe-flash/feed" rel="self" type="application/rss+xml" />
	<link>http://www.machin.com.mx</link>
	<description>Sólo para recordar</description>
	<lastBuildDate>Mon, 06 Sep 2010 07:34:18 +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>Zu-k City</title>
		<link>http://www.machin.com.mx/archives/4814</link>
		<comments>http://www.machin.com.mx/archives/4814#comments</comments>
		<pubDate>Thu, 05 Aug 2010 07:41:47 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Arqueología Machinesca]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Portafolio]]></category>
		<category><![CDATA[Videojuegos]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/?p=4814</guid>
		<description><![CDATA[<p>Otro juego de fútbol multiusuario en el cual colaboré con la programación del lado del servidor. Lo interesante que tuvo este proyecto es que había bots que jugaban junto con el jugador y en su contra utilizando agentes y máquinas de estado.</p>
<p align="center"><center><br />
<div class="igallery"><img src="/iGallery/zukcity/cancha3.jpg" alt="Juego contra la computadora" id="435652"  title="Juego contra la computadora" /><br /><a href="javascript:swapPhoto('/iGallery/zukcity/cancha3.jpg','435652')"><img src="/iGallery/zukcity/TN-cancha3.jpg" width="56" height="42" alt="Juego contra la computadora" title="Juego contra la computadora" /></a><a href="javascript:swapPhoto('/iGallery/zukcity/Cuarto3.jpg','435652')"><img src="/iGallery/zukcity/TN-Cuarto3.jpg" width="56" height="42" alt="Lobby del juego" title="Lobby del juego" /></a><a href="javascript:swapPhoto('/iGallery/zukcity/compu.jpg','435652')"><img src="/iGallery/zukcity/TN-compu.jpg" width="56" height="42" alt="Programé en mi laptop, pero con monitor y teclado" title="Programé en mi laptop, pero con monitor y teclado" /></a></div>
</center></p>
<p>Otra cosa que me gustó de este proyecto es que apliqué "nuevas técnicas" que me permitieron desarrollarlo en tiempo récord desde cero.</p>

]]></description>
			<content:encoded><![CDATA[<p>Otro juego de fútbol multiusuario en el cual colaboré con la programación del lado del servidor. Lo interesante que tuvo este proyecto es que había bots que jugaban junto con el jugador y en su contra utilizando agentes y máquinas de estado.</p>
<p align="center"><center><br />
<div class="igallery"><img src="/iGallery/zukcity/cancha3.jpg" alt="Juego contra la computadora" id="159641"  title="Juego contra la computadora" /><br /><a href="javascript:swapPhoto('/iGallery/zukcity/cancha3.jpg','159641')"><img src="/iGallery/zukcity/TN-cancha3.jpg" width="56" height="42" alt="Juego contra la computadora" title="Juego contra la computadora" /></a><a href="javascript:swapPhoto('/iGallery/zukcity/Cuarto3.jpg','159641')"><img src="/iGallery/zukcity/TN-Cuarto3.jpg" width="56" height="42" alt="Lobby del juego" title="Lobby del juego" /></a><a href="javascript:swapPhoto('/iGallery/zukcity/compu.jpg','159641')"><img src="/iGallery/zukcity/TN-compu.jpg" width="56" height="42" alt="Programé en mi laptop, pero con monitor y teclado" title="Programé en mi laptop, pero con monitor y teclado" /></a></div>
</center></p>
<p>Otra cosa que me gustó de este proyecto es que apliqué "nuevas técnicas" que me permitieron desarrollarlo en tiempo récord desde cero.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/4814/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Programación Adobe Air 2.0 en Linux</title>
		<link>http://www.machin.com.mx/archives/4795</link>
		<comments>http://www.machin.com.mx/archives/4795#comments</comments>
		<pubDate>Mon, 26 Jul 2010 11:43:13 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/?p=4795</guid>
		<description><![CDATA[<p>Al igual que las aplicaciones Flex, es posible desarrollar en Linux aplicaciones de escritorio en AIR. En este post pongo un ejemplo y una miniguía de instalación.</p>
<h4>Instalación</h4>
<p>Primero se necesita bajar e instalar la versión 4.1 de Flex, la cual se puede obtener de <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex4sdk" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/entitlement/index.cfm?e=flex4sdk&amp;referer=');">http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex4sdk</a> en forma de un archivo zip llamado <strong>flex_sdk_4.1.zip</strong></p>
<div class="syntax_hilite">
<div id="text-1">
<div class="text">mkdir flex<br />
cp flex_sdk_4.<span style="">1</span>.zip flex<br />
cd flex<br />
unzip flex_sdk_4.<span style="">1</span>.zip</div>
</div>
</div>
<p></p>
<p>Desafortunadamente la versión multiplataforma de Flex, aunque ya incluye una versión de Air, está rota y aparentemente sólo funciona para Windows y Mac. Pareciera que a los señores de Adobe se les olvidó Linux en el caso de Air; por lo que es necesario descargar el SDK de AIR y desempaquetarlo sobre el directorio donde instalamos Flex. </p>
<p>Entonces, bajamos <strong>Air 2.0</strong> de <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk&amp;referer=');">http://www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk</a> y sobre-escribimos el sdk de AIR que descargamos:</p>
<div class="syntax_hilite">
<div id="text-2">
<div class="text">cp AdobeAIRSDK.tbz2 flex<br />
cd flex<br />
bunzip2 AdobeAIRSDK.tbz2<br />
tar -xvf AdobeAIRSDK.tar</div>
</div>
</div>
<p></p>
<p>Sinceramente no sé si es el método correcto de arreglar los errores de Adobe, pero fue lo primero que se me ocurrió y me funcionó.</p>
<h4>Escribiendo un programa de prueba</h4>
<p>Como ejemplo de una aplicación creamos el programa <strong>mxml</strong> llamado <strong>Test.mxml</strong></p>
<div class="syntax_hilite">
<div id="xml-3">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;s:WindowedApplication</span>&nbsp; <span style="color: #000066;">xmlns:fx</span>=<span style="color: #ff0000;">"http://ns.adobe.com/mxml/2009"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">"library://ns.adobe.com/flex/spark"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">"library://ns.adobe.com/flex/mx"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/s:WindowedApplication<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>El cual compilamos con el comando:</p>
<div class="syntax_hilite">
<div id="text-4">
<div class="text">bin/mxmlc -library-path+=frameworks/libs/air Test.mxml</div>
</div>
</div>
<p></p>
<p>Ahora creamos un archivo que nos describe la aplicación AIR, al cual llamamos <strong>Test-app.xml</strong></p>
<div class="syntax_hilite">
<div id="xml-5">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span> <span style="color: #000066;">standalone</span>=<span style="color: #ff0000;">"no"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;application</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://ns.adobe.com/air/application/2.0"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Adobe AIR Application Descriptor File Template.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; Specifies parameters for identifying, installing, and launching AIR applications.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The last segment of the namespace specifies the version <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of the AIR runtime required for this application to run.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; minimumPatchLevel - The minimum patch level of the AIR runtime required to run <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the application. Optional.<br />
--&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- A universally unique application identifier. Must be unique across all AIR applications.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;id<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/id<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Used as the filename for the application. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;filename<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/filename<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The name that is displayed in the AIR application installer. <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;May have multiple values for each language. See samples or xsd schema file. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- An application version designator (such as &quot;v1&quot;, &quot;2.5&quot;, or &quot;Alpha 1&quot;). Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;version<span style="font-weight: bold; color: black;">&gt;</span></span></span>v1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/version<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Description, displayed in the AIR application installer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;May have multiple values for each language. See samples or xsd schema file. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;description&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Copyright information. Optional --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;copyright&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/copyright<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;publisherID&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/publisherID<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Settings for the application's initial window. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;initialWindow<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The main SWF or HTML file of the application. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Note: In Flash Builder, the SWF reference is set automatically. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;content<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test.swf<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/content<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The title of the main window. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;title&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/title<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The type of system chrome to use (either &quot;standard&quot; or &quot;none&quot;). Optional. Default standard. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;systemChrome&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/systemChrome<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;transparent&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/transparent<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the window is initially visible. Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;visible&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/visible<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the user can minimize the window. Optional. Default true. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;minimizable&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/minimizable<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the user can maximize the window. Optional. Default true. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;maximizable&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/maximizable<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the user can resize the window. Optional. Default true. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;resizable&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/resizable<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial width in pixels. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;width&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/width<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial height in pixels. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;height&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/height<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial x position. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;x&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/x<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial y position. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;y&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/y<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's minimum size, specified as a width/height pair in pixels, such as &quot;400 200&quot;. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;minSize&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/minSize<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial maximum size, specified as a width/height pair in pixels, such as &quot;1600 1200&quot;. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;maxSize&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/maxSize<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/initialWindow<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- We recommend omitting the supportedProfiles element, --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- which in turn permits your application to be deployed to all --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- devices supported by AIR. If you wish to restrict deployment --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- (i.e., to only mobile devices) then add this element and list --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- only the profiles which your application does support. --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;supportedProfiles&gt;</span></span>desktop extendedDesktop mobileDevice extendedMobileDevice<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/supportedProfiles<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The subpath of the standard default installation location to use. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;installFolder&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/installFolder<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;programMenuFolder&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/programMenuFolder<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The icon the system uses for the application. For at least one resolution,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;specify the path to a PNG file included in the AIR package. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;icon&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/icon<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the application handles the update when a user double-clicks an update version<br />
&nbsp; &nbsp; &nbsp; &nbsp; of the AIR file (true), or the default AIR application installer handles the update (false).<br />
&nbsp; &nbsp; &nbsp; &nbsp; Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;customUpdateUI&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/customUpdateUI<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the application can be launched when the user clicks a link in a web browser.<br />
&nbsp; &nbsp; &nbsp; &nbsp; Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;allowBrowserInvocation&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/allowBrowserInvocation<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Listing of file types for which the application can register. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;fileTypes&gt;</span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Defines one file type. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;fileType&gt;</span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The name that the system displays for the registered file type. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;name&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The extension to register. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;extension&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/extension<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The description of the file type. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;description&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The MIME content type. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;contentType&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/contentType<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The icon to display for the file type. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;icon&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/icon<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;/fileType&gt;</span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;/fileTypes&gt;</span></span> --&gt;</p>
<p><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/application<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>Finalmente ejecutamos la aplicación con:</p>
<div class="syntax_hilite">
<div id="text-6">
<div class="text">adl test.mxml</div>
</div>
</div>
<p></p>
<h4>Algunos detalles...</h4>
<p>Para usar aplicaciones que tengan transparencia es necesario que el escritorio la soporte; por ejemplo usando <strong>compiz</strong>.</p>

]]></description>
			<content:encoded><![CDATA[<p>Al igual que las aplicaciones Flex, es posible desarrollar en Linux aplicaciones de escritorio en AIR. En este post pongo un ejemplo y una miniguía de instalación.</p>
<h4>Instalación</h4>
<p>Primero se necesita bajar e instalar la versión 4.1 de Flex, la cual se puede obtener de <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex4sdk" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/entitlement/index.cfm?e=flex4sdk&amp;referer=');">http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex4sdk</a> en forma de un archivo zip llamado <strong>flex_sdk_4.1.zip</strong></p>
<div class="syntax_hilite">
<div id="text-7">
<div class="text">mkdir flex<br />
cp flex_sdk_4.<span style="">1</span>.zip flex<br />
cd flex<br />
unzip flex_sdk_4.<span style="">1</span>.zip</div>
</div>
</div>
<p></p>
<p>Desafortunadamente la versión multiplataforma de Flex, aunque ya incluye una versión de Air, está rota y aparentemente sólo funciona para Windows y Mac. Pareciera que a los señores de Adobe se les olvidó Linux en el caso de Air; por lo que es necesario descargar el SDK de AIR y desempaquetarlo sobre el directorio donde instalamos Flex. </p>
<p>Entonces, bajamos <strong>Air 2.0</strong> de <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk&amp;referer=');">http://www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk</a> y sobre-escribimos el sdk de AIR que descargamos:</p>
<div class="syntax_hilite">
<div id="text-8">
<div class="text">cp AdobeAIRSDK.tbz2 flex<br />
cd flex<br />
bunzip2 AdobeAIRSDK.tbz2<br />
tar -xvf AdobeAIRSDK.tar</div>
</div>
</div>
<p></p>
<p>Sinceramente no sé si es el método correcto de arreglar los errores de Adobe, pero fue lo primero que se me ocurrió y me funcionó.</p>
<h4>Escribiendo un programa de prueba</h4>
<p>Como ejemplo de una aplicación creamos el programa <strong>mxml</strong> llamado <strong>Test.mxml</strong></p>
<div class="syntax_hilite">
<div id="xml-9">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;s:WindowedApplication</span>&nbsp; <span style="color: #000066;">xmlns:fx</span>=<span style="color: #ff0000;">"http://ns.adobe.com/mxml/2009"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">"library://ns.adobe.com/flex/spark"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">"library://ns.adobe.com/flex/mx"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/s:WindowedApplication<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>El cual compilamos con el comando:</p>
<div class="syntax_hilite">
<div id="text-10">
<div class="text">bin/mxmlc -library-path+=frameworks/libs/air Test.mxml</div>
</div>
</div>
<p></p>
<p>Ahora creamos un archivo que nos describe la aplicación AIR, al cual llamamos <strong>Test-app.xml</strong></p>
<div class="syntax_hilite">
<div id="xml-11">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span> <span style="color: #000066;">standalone</span>=<span style="color: #ff0000;">"no"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;application</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://ns.adobe.com/air/application/2.0"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Adobe AIR Application Descriptor File Template.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; Specifies parameters for identifying, installing, and launching AIR applications.</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The last segment of the namespace specifies the version <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of the AIR runtime required for this application to run.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; minimumPatchLevel - The minimum patch level of the AIR runtime required to run <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the application. Optional.<br />
--&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- A universally unique application identifier. Must be unique across all AIR applications.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;id<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/id<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Used as the filename for the application. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;filename<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/filename<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The name that is displayed in the AIR application installer. <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;May have multiple values for each language. See samples or xsd schema file. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- An application version designator (such as &quot;v1&quot;, &quot;2.5&quot;, or &quot;Alpha 1&quot;). Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;version<span style="font-weight: bold; color: black;">&gt;</span></span></span>v1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/version<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Description, displayed in the AIR application installer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;May have multiple values for each language. See samples or xsd schema file. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;description&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Copyright information. Optional --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;copyright&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/copyright<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;publisherID&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/publisherID<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Settings for the application's initial window. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;initialWindow<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The main SWF or HTML file of the application. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Note: In Flash Builder, the SWF reference is set automatically. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;content<span style="font-weight: bold; color: black;">&gt;</span></span></span>Test.swf<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/content<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The title of the main window. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;title&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/title<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The type of system chrome to use (either &quot;standard&quot; or &quot;none&quot;). Optional. Default standard. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;systemChrome&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/systemChrome<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;transparent&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/transparent<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the window is initially visible. Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;visible&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/visible<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the user can minimize the window. Optional. Default true. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;minimizable&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/minimizable<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the user can maximize the window. Optional. Default true. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;maximizable&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/maximizable<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the user can resize the window. Optional. Default true. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;resizable&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/resizable<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial width in pixels. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;width&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/width<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial height in pixels. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;height&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/height<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial x position. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;x&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/x<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial y position. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;y&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/y<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's minimum size, specified as a width/height pair in pixels, such as &quot;400 200&quot;. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;minSize&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/minSize<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The window's initial maximum size, specified as a width/height pair in pixels, such as &quot;1600 1200&quot;. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;maxSize&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/maxSize<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/initialWindow<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- We recommend omitting the supportedProfiles element, --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- which in turn permits your application to be deployed to all --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- devices supported by AIR. If you wish to restrict deployment --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- (i.e., to only mobile devices) then add this element and list --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- only the profiles which your application does support. --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;supportedProfiles&gt;</span></span>desktop extendedDesktop mobileDevice extendedMobileDevice<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/supportedProfiles<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The subpath of the standard default installation location to use. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;installFolder&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/installFolder<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;programMenuFolder&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/programMenuFolder<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The icon the system uses for the application. For at least one resolution,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;specify the path to a PNG file included in the AIR package. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;icon&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/icon<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the application handles the update when a user double-clicks an update version<br />
&nbsp; &nbsp; &nbsp; &nbsp; of the AIR file (true), or the default AIR application installer handles the update (false).<br />
&nbsp; &nbsp; &nbsp; &nbsp; Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;customUpdateUI&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/customUpdateUI<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Whether the application can be launched when the user clicks a link in a web browser.<br />
&nbsp; &nbsp; &nbsp; &nbsp; Optional. Default false. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;allowBrowserInvocation&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/allowBrowserInvocation<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Listing of file types for which the application can register. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;fileTypes&gt;</span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Defines one file type. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;fileType&gt;</span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The name that the system displays for the registered file type. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;name&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The extension to register. Required. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;extension&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/extension<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The description of the file type. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;description&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The MIME content type. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;contentType&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/contentType<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- The icon to display for the file type. Optional. --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;icon&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image16x16<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image32x32<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image48x48<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/image128x128<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/icon<span style="font-weight: bold; color: black;">&gt;</span></span></span> --&gt;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;/fileType&gt;</span></span> --&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- &lt;/fileTypes&gt;</span></span> --&gt;</p>
<p><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/application<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>Finalmente ejecutamos la aplicación con:</p>
<div class="syntax_hilite">
<div id="text-12">
<div class="text">adl test.mxml</div>
</div>
</div>
<p></p>
<h4>Algunos detalles...</h4>
<p>Para usar aplicaciones que tengan transparencia es necesario que el escritorio la soporte; por ejemplo usando <strong>compiz</strong>.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/4795/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>El cubo volador</title>
		<link>http://www.machin.com.mx/archives/4748</link>
		<comments>http://www.machin.com.mx/archives/4748#comments</comments>
		<pubDate>Wed, 14 Jul 2010 07:11:01 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Portafolio]]></category>
		<category><![CDATA[Proyectos]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/?p=4748</guid>
		<description><![CDATA[<p>Una pequeña prueba de concepto para agregar figuras 3D a videos para juegos y otras aplicaciones.</p>
<p align="center">
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/u5x-qoyloX0&amp;hl=es_MX&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/u5x-qoyloX0&amp;hl=es_MX&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
</p>
<p>Por supuesto que el guión no esta basado en algo que me haya pasado <img src='http://www.machin.com.mx/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

]]></description>
			<content:encoded><![CDATA[<p>Una pequeña prueba de concepto para agregar figuras 3D a videos para juegos y otras aplicaciones.</p>
<p align="center">
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/u5x-qoyloX0&amp;hl=es_MX&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/u5x-qoyloX0&amp;hl=es_MX&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
</p>
<p>Por supuesto que el guión no esta basado en algo que me haya pasado <img src='http://www.machin.com.mx/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/4748/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Burundis 2000</title>
		<link>http://www.machin.com.mx/archives/4499</link>
		<comments>http://www.machin.com.mx/archives/4499#comments</comments>
		<pubDate>Wed, 21 Apr 2010 10:00:01 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Arqueología Machinesca]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Portafolio]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/archives/4499</guid>
		<description><![CDATA[<p>Este es un sitio que me tocó administrar por dos años en una época muy difícil. Las máquinas eran <strong>Pentium III</strong> a 500 Mhz y los proyectos de software libre apenas empezaban a tomar vuelo a nivel industrial. Esto se traducía a que el software y el hardware era muy inestable especialmente cuando se llevaba a sus extremos. Aunque uno tuviera mucho cuidado no eran raras las fallas y caídas de los servidores debido a lo novel que estaban los desarrollos. Me tocó experimentar con la beta de <strong>ReiserFS</strong> para soportar "grandes" cantidades de directorios y de manera rápida. Ahora ya son comunes los sistemas de archivo basados en journaling e incluso las configuraciones por defecto pueden aguantar una buena carga.</p>
<p align="center"><center><br />
<div class="igallery"><img src="/iGallery/burundis/a1s01c02b1.jpg" alt="Comenzaba a usarse el formato de los blogs tan común ahora." id="625850"  title="Comenzaba a usarse el formato de los blogs tan común ahora." /><br /><a href="javascript:swapPhoto('/iGallery/burundis/a1s01c02b1.jpg','625850')"><img src="/iGallery/burundis/TN-a1s01c02b1.jpg" width="56" height="42" alt="Comenzaba a usarse el formato de los blogs tan común ahora." title="Comenzaba a usarse el formato de los blogs tan común ahora." /></a><a href="javascript:swapPhoto('/iGallery/burundis/a1s03c06b3.jpg','625850')"><img src="/iGallery/burundis/TN-a1s03c06b3.jpg" width="56" height="42" alt="" title="" /></a><a href="javascript:swapPhoto('/iGallery/burundis/a1s02c02b2.jpg','625850')"><img src="/iGallery/burundis/TN-a1s02c02b2.jpg" width="56" height="42" alt="" title="" /></a></div>
</center></p>
<p>Los días de San Valentín teníamos un tráfico impresionante. La situación se empeoraba porque muchos sitios de correos gratuitos se caían y bloqueaban las multiples colas de correo que levantavamos. </p>
<p>La ventaja... en esos tiempos había mucho menos spam.</p>

]]></description>
			<content:encoded><![CDATA[<p>Este es un sitio que me tocó administrar por dos años en una época muy difícil. Las máquinas eran <strong>Pentium III</strong> a 500 Mhz y los proyectos de software libre apenas empezaban a tomar vuelo a nivel industrial. Esto se traducía a que el software y el hardware era muy inestable especialmente cuando se llevaba a sus extremos. Aunque uno tuviera mucho cuidado no eran raras las fallas y caídas de los servidores debido a lo novel que estaban los desarrollos. Me tocó experimentar con la beta de <strong>ReiserFS</strong> para soportar "grandes" cantidades de directorios y de manera rápida. Ahora ya son comunes los sistemas de archivo basados en journaling e incluso las configuraciones por defecto pueden aguantar una buena carga.</p>
<p align="center"><center><br />
<div class="igallery"><img src="/iGallery/burundis/a1s01c02b1.jpg" alt="Comenzaba a usarse el formato de los blogs tan común ahora." id="788859"  title="Comenzaba a usarse el formato de los blogs tan común ahora." /><br /><a href="javascript:swapPhoto('/iGallery/burundis/a1s01c02b1.jpg','788859')"><img src="/iGallery/burundis/TN-a1s01c02b1.jpg" width="56" height="42" alt="Comenzaba a usarse el formato de los blogs tan común ahora." title="Comenzaba a usarse el formato de los blogs tan común ahora." /></a><a href="javascript:swapPhoto('/iGallery/burundis/a1s03c06b3.jpg','788859')"><img src="/iGallery/burundis/TN-a1s03c06b3.jpg" width="56" height="42" alt="" title="" /></a><a href="javascript:swapPhoto('/iGallery/burundis/a1s02c02b2.jpg','788859')"><img src="/iGallery/burundis/TN-a1s02c02b2.jpg" width="56" height="42" alt="" title="" /></a></div>
</center></p>
<p>Los días de San Valentín teníamos un tráfico impresionante. La situación se empeoraba porque muchos sitios de correos gratuitos se caían y bloqueaban las multiples colas de correo que levantavamos. </p>
<p>La ventaja... en esos tiempos había mucho menos spam.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/4499/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conexión remota a un escritorio Linux desde una máquina XP</title>
		<link>http://www.machin.com.mx/archives/4379</link>
		<comments>http://www.machin.com.mx/archives/4379#comments</comments>
		<pubDate>Thu, 18 Mar 2010 12:56:30 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Arqueología Machinesca]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/archives/4379</guid>
		<description><![CDATA[<p>Revisando memory-sticks abandonados encontré un video de noviembre de 2006 donde grababa una prueba de como me conectaba desde mi máquina <strong>XP</strong> a mi servidor <strong>Linux</strong> con <strong>KDE</strong> y <strong>Fedora Core 6</strong>. Se puede ver como corría al mismo tiempo un video, un chat 3D escrito en <strong>Flash</strong> y un programa de demostración 3D de <strong>Irrlicht</strong> (<strong>OpenGL</strong>). Desafortunadamente es una de mis primeras pruebas y no transmitía el audio. Al poco rato de hacer este video configuré lo que me hacía falta.</p>
<p align="center">
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/ZVp2qGofQXk&#038;hl=es_MX&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZVp2qGofQXk&#038;hl=es_MX&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
</p>
<p>Realmente el desempeño es muy bueno considerando que es una conexión remota. En parte es porque las ordenes <strong>OpenGL</strong> se corren localmente como se puede ver en el acercamiento a la terminal en la parte final del video.</p>

]]></description>
			<content:encoded><![CDATA[<p>Revisando memory-sticks abandonados encontré un video de noviembre de 2006 donde grababa una prueba de como me conectaba desde mi máquina <strong>XP</strong> a mi servidor <strong>Linux</strong> con <strong>KDE</strong> y <strong>Fedora Core 6</strong>. Se puede ver como corría al mismo tiempo un video, un chat 3D escrito en <strong>Flash</strong> y un programa de demostración 3D de <strong>Irrlicht</strong> (<strong>OpenGL</strong>). Desafortunadamente es una de mis primeras pruebas y no transmitía el audio. Al poco rato de hacer este video configuré lo que me hacía falta.</p>
<p align="center">
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/ZVp2qGofQXk&#038;hl=es_MX&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZVp2qGofQXk&#038;hl=es_MX&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
</p>
<p>Realmente el desempeño es muy bueno considerando que es una conexión remota. En parte es porque las ordenes <strong>OpenGL</strong> se corren localmente como se puede ver en el acercamiento a la terminal en la parte final del video.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/4379/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objetos Remotos Java con BlazeDS y Flex &#8211; Parte 1</title>
		<link>http://www.machin.com.mx/archives/1781</link>
		<comments>http://www.machin.com.mx/archives/1781#comments</comments>
		<pubDate>Sun, 18 Jan 2009 19:01:12 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/?p=1781</guid>
		<description><![CDATA[<p>Esta es una pequeña prueba de concepto de como se pueden llamar objetos remotos java desde <strong>Flex</strong> usando <strong>Linux</strong> y <strong>Tomcat</strong> del lado del servidor.</p>
<h4>Creación de la aplicación web en Tomcat</h4>
<p>1. Dentro del directorio <strong>webapps</strong>, creamos el directorio de nuestro proyecto (p.e. blazeds):</p>
<div class="syntax_hilite">
<div id="text-13">
<div class="text">mkdir webapps/blazeds</div>
</div>
</div>
<p></p>
<p>2. Bajamos la distribución binaria  de <strong>BlazeDS</strong> de su <a href="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds" onclick="pageTracker._trackPageview('/outgoing/opensource.adobe.com/wiki/display/blazeds/Release+Builds?referer=');">página de Internet</a> y la desempaquetamos en un directorio temporal.</p>
<p>3. Copiamos el archivo <strong>blazeds.war</strong> al directorio de nuestro proyecto y lo desempaquetamos. </p>
<p>4. Borramos el archivo .war.</p>
<p>5. Opcionalmente, agregamos la siguiente línea al archivo de configuración <strong>conf/server.xml</strong>  dentro del tag de Host, para que tengamos bien definido el directorio de nuestra aplicación:</p>
<div class="syntax_hilite">
<div id="xml-14">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Context</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">"/blazeds"</span> <span style="color: #000066;">docBase</span>=<span style="color: #ff0000;">"blazeds"</span> <span style="color: #000066;">debug</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">reloadable</span>=<span style="color: #ff0000;">"true"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</div>
</div>
<p></p>
<p>6. Agregamos el archivo de seguridad <strong>crossdomain.xml</strong> donde este el directorio raíz de nuestro dominio:</p>
<div class="syntax_hilite">
<div id="xml-15">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;cross-domain-policy<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;allow-access-from</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">"*"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/cross-domain-policy<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<h4>Creación del Objeto Remoto en Java</h4>
<p>Para este ejemplo, creamos una pequeña clase en <strong>Java</strong>, en el directorio <strong>WEB-INF/src</strong> que simplemente nos de la hora:</p>
<div class="syntax_hilite">
<div id="java-16">
<div class="java"><span style="color: #a1a100;">import java.util.Date;</span></p>
<p><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Sereno <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3AString+java.sun.com_amp_bntI=I_27m_20Feeling_20Lucky&amp;referer=');"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getTime<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADate+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3ADate+java.sun.com_amp_bntI=I_27m_20Feeling_20Lucky&amp;referer=');"><span style="color: #aaaadd; font-weight: bold;">Date</span></a> now = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADate+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3ADate+java.sun.com_amp_bntI=I_27m_20Feeling_20Lucky&amp;referer=');"><span style="color: #aaaadd; font-weight: bold;">Date</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #ff0000;">"The time is: "</span> + now;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p><span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>La compilamos con:</p>
<div class="syntax_hilite">
<div id="text-17">
<div class="text">javac Sereno</div>
</div>
</div>
<p></p>
<p>La copiamos al directorio <strong>classes</strong>.</p>
<p>Ahora que todo esta listo del lado del servidor, declaramos nuestra clase agregando las siguientes lineas al tag <strong>service</strong> del archivo <strong>flex/Remoting-config.xml</strong>:</p>
<div class="syntax_hilite">
<div id="xml-18">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;destination</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"blazeds"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;properties<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- El nombre de nuestra clase --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source<span style="font-weight: bold; color: black;">&gt;</span></span></span>Sereno<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/source<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/properties<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/destination<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<h4>Creación de la aplicación Flex</h4>
<p>Del lado del cliente, necesitamos crear un archivo de configuración <strong>services-config.xml</strong> que más adelante se utilizará como un parámetro del comando <strong>mxmlc</strong> que compila nuestro código.</p>
<div class="syntax_hilite">
<div id="xml-19">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"UTF-8"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;services-config<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;services<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;service</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"remoting-service"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"flex.messaging.services.RemotingService"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">messageTypes</span>=<span style="color: #ff0000;">"flex.messaging.messages.RemotingMessage"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;adapters<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;adapter-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"java-object"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"flex.messaging.services.remoting.adapters.JavaAdapter"</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">"true"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/adapters<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Con este id, llamamos al java desde flex --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;destination</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"blazeds"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channel</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">"my-amf"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/destination<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/service<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/services<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channel-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"my-amf"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"mx.messaging.channels.AMFChannel"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Aqui tengo la ruta de donde se va a jalar las cosas, proviene del war de flex --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;endpoint</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">"http://192.168.1.100:8080/blazeds/messagebroker/amf"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"flex.messaging.endpoints.AMFEndpoint"</span><span style="font-weight: bold; color: black;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/channel-definition<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/services-config<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>Aquí tenemos el mxml (blazeds.mxml ) que vamos usar como ejemplo:</p>
<div class="syntax_hilite">
<div id="xml-20">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">"absolute"</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"*"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:Script<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;![CDATA[</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.controls.Alert;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.rpc.events.FaultEvent;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.rpc.events.ResultEvent;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Esta función se llama cuando se llamo exitosamente a nuestro objeto:</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public function onMethodResult(event:ResultEvent):void {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bo.label = &quot;Result &quot;+event.result</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bo.label += &quot;nDataType &quot;+ typeof(event.result)</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]]&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx:Script<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>
&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:RemoteObject</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"ro"</span> <span style="color: #000066;">destination</span>=<span style="color: #ff0000;">"blazeds"</span> <span style="color: #000066;">fault</span>=<span style="color: #ff0000;">"Alert.show(event.fault.faultString, 'Error')"</span> <span style="color: #000066;">result</span>=<span style="color: #ff0000;">"{onMethodResult(event)}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Aquí declaramos todas las funciones que vamos a llamar del objeto Java --&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"getTime"</span> <span style="color: #000066;">result</span>=<span style="color: #ff0000;">"{onMethodResult(event)}"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></p>
<p>&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx:RemoteObject<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:Label</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"bo"</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">""</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">"ro.getTime()"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></p>
<p><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx:Application<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>Lo compilamos con la siguiente línea de comando:</p>
<div class="syntax_hilite">
<div id="text-21">
<div class="text">~/flex/bin/mxmlc blazeds.mxml -services &quot;services-config.xml&quot;</div>
</div>
</div>
<p></p>
<p>Al ejecutar el mxml, veremos una etiqueta vacia que al darle doble click, nos imprimirá la hora del servidor.  </p>
<h4>Conclusiones</h4>
<p>De aquí en adelante, ya todo es creatividad. Por supuesto que  se pueden usar frameworks como <strong>Spring</strong> para acelerar el desarrollo del lado del servidor. Pero lo importante de este post, era comprobar con una prueba de concepto lo bien que se llevan estas tecnologías y hacerlo "a manita" para aprender más. No es muy díficil hacer esto mismo con <strong>Flex Builder</strong> para el cliente y <strong>Eclipse</strong> para el servidor.</p>

]]></description>
			<content:encoded><![CDATA[<p>Esta es una pequeña prueba de concepto de como se pueden llamar objetos remotos java desde <strong>Flex</strong> usando <strong>Linux</strong> y <strong>Tomcat</strong> del lado del servidor.</p>
<h4>Creación de la aplicación web en Tomcat</h4>
<p>1. Dentro del directorio <strong>webapps</strong>, creamos el directorio de nuestro proyecto (p.e. blazeds):</p>
<div class="syntax_hilite">
<div id="text-22">
<div class="text">mkdir webapps/blazeds</div>
</div>
</div>
<p></p>
<p>2. Bajamos la distribución binaria  de <strong>BlazeDS</strong> de su <a href="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds" onclick="pageTracker._trackPageview('/outgoing/opensource.adobe.com/wiki/display/blazeds/Release+Builds?referer=');">página de Internet</a> y la desempaquetamos en un directorio temporal.</p>
<p>3. Copiamos el archivo <strong>blazeds.war</strong> al directorio de nuestro proyecto y lo desempaquetamos. </p>
<p>4. Borramos el archivo .war.</p>
<p>5. Opcionalmente, agregamos la siguiente línea al archivo de configuración <strong>conf/server.xml</strong>  dentro del tag de Host, para que tengamos bien definido el directorio de nuestra aplicación:</p>
<div class="syntax_hilite">
<div id="xml-23">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Context</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">"/blazeds"</span> <span style="color: #000066;">docBase</span>=<span style="color: #ff0000;">"blazeds"</span> <span style="color: #000066;">debug</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">reloadable</span>=<span style="color: #ff0000;">"true"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</div>
</div>
<p></p>
<p>6. Agregamos el archivo de seguridad <strong>crossdomain.xml</strong> donde este el directorio raíz de nuestro dominio:</p>
<div class="syntax_hilite">
<div id="xml-24">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;cross-domain-policy<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;allow-access-from</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">"*"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/cross-domain-policy<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<h4>Creación del Objeto Remoto en Java</h4>
<p>Para este ejemplo, creamos una pequeña clase en <strong>Java</strong>, en el directorio <strong>WEB-INF/src</strong> que simplemente nos de la hora:</p>
<div class="syntax_hilite">
<div id="java-25">
<div class="java"><span style="color: #a1a100;">import java.util.Date;</span></p>
<p><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Sereno <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3AString+java.sun.com_amp_bntI=I_27m_20Feeling_20Lucky&amp;referer=');"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getTime<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADate+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3ADate+java.sun.com_amp_bntI=I_27m_20Feeling_20Lucky&amp;referer=');"><span style="color: #aaaadd; font-weight: bold;">Date</span></a> now = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADate+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3ADate+java.sun.com_amp_bntI=I_27m_20Feeling_20Lucky&amp;referer=');"><span style="color: #aaaadd; font-weight: bold;">Date</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #ff0000;">"The time is: "</span> + now;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p><span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>La compilamos con:</p>
<div class="syntax_hilite">
<div id="text-26">
<div class="text">javac Sereno</div>
</div>
</div>
<p></p>
<p>La copiamos al directorio <strong>classes</strong>.</p>
<p>Ahora que todo esta listo del lado del servidor, declaramos nuestra clase agregando las siguientes lineas al tag <strong>service</strong> del archivo <strong>flex/Remoting-config.xml</strong>:</p>
<div class="syntax_hilite">
<div id="xml-27">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;destination</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"blazeds"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;properties<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- El nombre de nuestra clase --&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source<span style="font-weight: bold; color: black;">&gt;</span></span></span>Sereno<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/source<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/properties<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/destination<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<h4>Creación de la aplicación Flex</h4>
<p>Del lado del cliente, necesitamos crear un archivo de configuración <strong>services-config.xml</strong> que más adelante se utilizará como un parámetro del comando <strong>mxmlc</strong> que compila nuestro código.</p>
<div class="syntax_hilite">
<div id="xml-28">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"UTF-8"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;services-config<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;services<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;service</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"remoting-service"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"flex.messaging.services.RemotingService"</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">messageTypes</span>=<span style="color: #ff0000;">"flex.messaging.messages.RemotingMessage"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;adapters<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;adapter-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"java-object"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"flex.messaging.services.remoting.adapters.JavaAdapter"</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">"true"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/adapters<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Con este id, llamamos al java desde flex --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;destination</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"blazeds"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channel</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">"my-amf"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/destination<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/service<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/services<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;channel-definition</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"my-amf"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"mx.messaging.channels.AMFChannel"</span><span style="font-weight: bold; color: black;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Aqui tengo la ruta de donde se va a jalar las cosas, proviene del war de flex --&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;endpoint</span> <span style="color: #000066;">uri</span>=<span style="color: #ff0000;">"http://192.168.1.100:8080/blazeds/messagebroker/amf"</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"flex.messaging.endpoints.AMFEndpoint"</span><span style="font-weight: bold; color: black;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/channel-definition<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/channels<span style="font-weight: bold; color: black;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/services-config<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>Aquí tenemos el mxml (blazeds.mxml ) que vamos usar como ejemplo:</p>
<div class="syntax_hilite">
<div id="xml-29">
<div class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"utf-8"</span><span style="font-weight: bold; color: black;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">"http://www.adobe.com/2006/mxml"</span> <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">"absolute"</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"*"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:Script<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;![CDATA[</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.controls.Alert;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.rpc.events.FaultEvent;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.rpc.events.ResultEvent;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Esta función se llama cuando se llamo exitosamente a nuestro objeto:</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public function onMethodResult(event:ResultEvent):void {</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bo.label = &quot;Result &quot;+event.result</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bo.label += &quot;nDataType &quot;+ typeof(event.result)</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]]&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx:Script<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>
&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:RemoteObject</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"ro"</span> <span style="color: #000066;">destination</span>=<span style="color: #ff0000;">"blazeds"</span> <span style="color: #000066;">fault</span>=<span style="color: #ff0000;">"Alert.show(event.fault.faultString, 'Error')"</span> <span style="color: #000066;">result</span>=<span style="color: #ff0000;">"{onMethodResult(event)}"</span><span style="font-weight: bold; color: black;">&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Aquí declaramos todas las funciones que vamos a llamar del objeto Java --&gt;</span></span></p>
<p>&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"getTime"</span> <span style="color: #000066;">result</span>=<span style="color: #ff0000;">"{onMethodResult(event)}"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></p>
<p>&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx:RemoteObject<span style="font-weight: bold; color: black;">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx:Label</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"bo"</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">""</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">"ro.getTime()"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></p>
<p><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx:Application<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</div>
</div>
<p></p>
<p>Lo compilamos con la siguiente línea de comando:</p>
<div class="syntax_hilite">
<div id="text-30">
<div class="text">~/flex/bin/mxmlc blazeds.mxml -services &quot;services-config.xml&quot;</div>
</div>
</div>
<p></p>
<p>Al ejecutar el mxml, veremos una etiqueta vacia que al darle doble click, nos imprimirá la hora del servidor.  </p>
<h4>Conclusiones</h4>
<p>De aquí en adelante, ya todo es creatividad. Por supuesto que  se pueden usar frameworks como <strong>Spring</strong> para acelerar el desarrollo del lado del servidor. Pero lo importante de este post, era comprobar con una prueba de concepto lo bien que se llevan estas tecnologías y hacerlo "a manita" para aprender más. No es muy díficil hacer esto mismo con <strong>Flex Builder</strong> para el cliente y <strong>Eclipse</strong> para el servidor.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/1781/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Ciudad Konec-t</title>
		<link>http://www.machin.com.mx/archives/1084</link>
		<comments>http://www.machin.com.mx/archives/1084#comments</comments>
		<pubDate>Tue, 11 Nov 2008 06:28:10 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Arqueología Machinesca]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Portafolio]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[Videojuegos]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Konec-t]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/?p=1084</guid>
		<description><![CDATA[<p><strong>Ciudad Konec-t</strong> fué uno de los proyectos en el cual participé por mi paso por Interalia (8 años). Fue muy divertido colaborar en la programación de la parte del servidor y hacer que soportara sin problemas a más de 2600 usuarios simultáneos con tan sólo dos maquinitas.</p>
<p align="center"><center><br />
<div class="igallery"><img src="/iGallery/Konec-t/Konec-t3.jpg" alt="Así era en un principio" id="703639"  title="Así era en un principio" /><br /><a href="javascript:swapPhoto('/iGallery/Konec-t/Konec-t3.jpg','703639')"><img src="/iGallery/Konec-t/TN-Konec-t3.jpg" width="56" height="42" alt="Así era en un principio" title="Así era en un principio" /></a><a href="javascript:swapPhoto('/iGallery/Konec-t/Konec-t1.jpg','703639')"><img src="/iGallery/Konec-t/TN-Konec-t1.jpg" width="56" height="42" alt="Fue creciendo" title="Fue creciendo" /></a><a href="javascript:swapPhoto('/iGallery/Konec-t/Konec-t2.jpg','703639')"><img src="/iGallery/Konec-t/TN-Konec-t2.jpg" width="56" height="42" alt="Uno de los cuartos populares" title="Uno de los cuartos populares" /></a></div>
</center></p>
<p>Las imagenes anteriores son de la primera versión. Después se cambiaron los fondos a un diseño más actual y más 3D. </p>
<p>
<h4>Actualización:</h4>
</p>
<p>Fue una campaña publicitaria muy exitosa, duró desde octubre de 2004 a finales de Diciembre de 2009 y se extendio a varios paises latinoamericanos.</p>

]]></description>
			<content:encoded><![CDATA[<p><strong>Ciudad Konec-t</strong> fué uno de los proyectos en el cual participé por mi paso por Interalia (8 años). Fue muy divertido colaborar en la programación de la parte del servidor y hacer que soportara sin problemas a más de 2600 usuarios simultáneos con tan sólo dos maquinitas.</p>
<p align="center"><center><br />
<div class="igallery"><img src="/iGallery/Konec-t/Konec-t3.jpg" alt="Así era en un principio" id="411275"  title="Así era en un principio" /><br /><a href="javascript:swapPhoto('/iGallery/Konec-t/Konec-t3.jpg','411275')"><img src="/iGallery/Konec-t/TN-Konec-t3.jpg" width="56" height="42" alt="Así era en un principio" title="Así era en un principio" /></a><a href="javascript:swapPhoto('/iGallery/Konec-t/Konec-t1.jpg','411275')"><img src="/iGallery/Konec-t/TN-Konec-t1.jpg" width="56" height="42" alt="Fue creciendo" title="Fue creciendo" /></a><a href="javascript:swapPhoto('/iGallery/Konec-t/Konec-t2.jpg','411275')"><img src="/iGallery/Konec-t/TN-Konec-t2.jpg" width="56" height="42" alt="Uno de los cuartos populares" title="Uno de los cuartos populares" /></a></div>
</center></p>
<p>Las imagenes anteriores son de la primera versión. Después se cambiaron los fondos a un diseño más actual y más 3D. </p>
<p>
<h4>Actualización:</h4>
</p>
<p>Fue una campaña publicitaria muy exitosa, duró desde octubre de 2004 a finales de Diciembre de 2009 y se extendio a varios paises latinoamericanos.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/1084/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Programación Flash/ActionScript 3 en Linux</title>
		<link>http://www.machin.com.mx/archives/217</link>
		<comments>http://www.machin.com.mx/archives/217#comments</comments>
		<pubDate>Tue, 11 Mar 2008 04:45:39 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/archives/217</guid>
		<description><![CDATA[<p>En el pasado, programar aplicaciones en Flash significaba un problema para los usuarios de Linux por el poco soporte que daba Macromedia/Adobe. Afortunadamente, las cosas han cambiado un poco debido a que ahora esta disponible un compilador de AS3 en nuestra plataforma favorita. En este post trato brevemente como hacer películas "swf" en Linux desde la línea de comandos:</p>
<h4>Instalación</h4>
<p>1. Bajar el Adobe Flex 3 SDK  de Adobe (flex_sdk_3.zip) de la siguiente URL: <a href="http://www.adobe.com/products/flex/flexdownloads/index.html" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/products/flex/flexdownloads/index.html?referer=');">http://www.adobe.com/products/flex/flexdownloads/index.html<br />
</A></p>
<p>2. <b>Como usuario root</b>, desempaquetar el archivo flex_sdk_3.zip y poner algunos permisos para que todos los usuarios lo puedan utilizar:</p>
<div class="syntax_hilite">
<div id="text-31">
<div class="text">mkdir /usr/local/bin/flex3<br />
cp flex_sdk_3.zip /usr/local/bin/flex3<br />
cd /usr/local/bin/flex3<br />
unzip flex_sdk_3.zip<br />
chmod a+r * -Rf<br />
chmod a+x bin<br />
chmod a+x bin/*<br />
chmod a+x lib<br />
chmod a+x frameworks<br />
chmod a+x frameworks/libs<br />
chmod a+x frameworks/libs/player<br />
chmod a+x frameworks/locale</div>
</div>
</div>
<p></p>
<p>O bien, si se quiere evitar problemas, <b>como usuario local</b> en su home:</p>
<div class="syntax_hilite">
<div id="text-32">
<div class="text">mkdir flex3<br />
cp flex3_sdk_3.zip flex3<br />
cd flex3<br />
unzip flex3_sdk_3.zip</div>
</div>
</div>
<p></p>
<h4>Escribiendo un programa de prueba</h4>
<p>Para ilustrar la compilación, hacemos un pequeño programa de dos archivos que lo único que hace es desplegar un texto y un circulo en la pantalla. El primer archivo llamado <b>SphericCow.as</b> se encargada de dibujar un círculo negro (sobrecargando la clase "Shape"):</p>
<div class="syntax_hilite">
<div id="actionscript-33">
<div class="actionscript">package <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;</p>
<p>&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span></p>
<p>&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SphericCow <span style="color: #0066CC;">extends</span> Shape <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SphericCow<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span> 0x000000, <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">80</span> , <span style="color: #cc66cc;">70</span> , <span style="color: #cc66cc;">30</span> <span style="color: #66cc66;">&#41;</span>; </p>
<p>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></p>
<p>&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>El segundo archivo, llamado <b>MyFirstProgram.as</b>, es la aplicación en sí, que utiliza nuestra clase anterior y pone también un pequeño texto:</p>
<div class="syntax_hilite">
<div id="actionscript-34">
<div class="actionscript">package <span style="color: #66cc66;">&#123;</span></p>
<p>&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> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;</p>
<p>&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//&nbsp; Main class</span></p>
<p>&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyFirstProgram <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span><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> MyFirstProgram<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> title:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"My first Program!"</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>title<span style="color: #66cc66;">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> sphericCow:SphericCow = <span style="color: #000000; font-weight: bold;">new</span> SphericCow<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span> sphericCow <span style="color: #66cc66;">&#41;</span>;</p>
<p>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p>&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p><span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<h4>Compilando nuestro programa</h4>
<p>Se compila con:</p>
<div class="syntax_hilite">
<div id="text-35">
<div class="text">/usr/local/bin/flex3/bin/mxmlc MyFirstProgram.as</div>
</div>
</div>
<p></p>
<p>o si lo instalamos en nuestro home:</p>
<div class="syntax_hilite">
<div id="text-36">
<div class="text">$HOME/flex3/bin/mxmlc MyFirstProgram.as</div>
</div>
</div>
<p></p>
<p>El cual creará un archivo <b>MyFirstProgram.swf</b>, el cual podemos arrastrar a nuestro navegador firefox para verlo en acción. Por supuesto, podemos agregar la ruta al archivo .bashrc para evitar el tener que escribir las rutas completas al compilar.</p>

]]></description>
			<content:encoded><![CDATA[<p>En el pasado, programar aplicaciones en Flash significaba un problema para los usuarios de Linux por el poco soporte que daba Macromedia/Adobe. Afortunadamente, las cosas han cambiado un poco debido a que ahora esta disponible un compilador de AS3 en nuestra plataforma favorita. En este post trato brevemente como hacer películas "swf" en Linux desde la línea de comandos:</p>
<h4>Instalación</h4>
<p>1. Bajar el Adobe Flex 3 SDK  de Adobe (flex_sdk_3.zip) de la siguiente URL: <a href="http://www.adobe.com/products/flex/flexdownloads/index.html" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/products/flex/flexdownloads/index.html?referer=');">http://www.adobe.com/products/flex/flexdownloads/index.html<br />
</A></p>
<p>2. <b>Como usuario root</b>, desempaquetar el archivo flex_sdk_3.zip y poner algunos permisos para que todos los usuarios lo puedan utilizar:</p>
<div class="syntax_hilite">
<div id="text-37">
<div class="text">mkdir /usr/local/bin/flex3<br />
cp flex_sdk_3.zip /usr/local/bin/flex3<br />
cd /usr/local/bin/flex3<br />
unzip flex_sdk_3.zip<br />
chmod a+r * -Rf<br />
chmod a+x bin<br />
chmod a+x bin/*<br />
chmod a+x lib<br />
chmod a+x frameworks<br />
chmod a+x frameworks/libs<br />
chmod a+x frameworks/libs/player<br />
chmod a+x frameworks/locale</div>
</div>
</div>
<p></p>
<p>O bien, si se quiere evitar problemas, <b>como usuario local</b> en su home:</p>
<div class="syntax_hilite">
<div id="text-38">
<div class="text">mkdir flex3<br />
cp flex3_sdk_3.zip flex3<br />
cd flex3<br />
unzip flex3_sdk_3.zip</div>
</div>
</div>
<p></p>
<h4>Escribiendo un programa de prueba</h4>
<p>Para ilustrar la compilación, hacemos un pequeño programa de dos archivos que lo único que hace es desplegar un texto y un circulo en la pantalla. El primer archivo llamado <b>SphericCow.as</b> se encargada de dibujar un círculo negro (sobrecargando la clase "Shape"):</p>
<div class="syntax_hilite">
<div id="actionscript-39">
<div class="actionscript">package <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;</p>
<p>&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//</span></p>
<p>&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SphericCow <span style="color: #0066CC;">extends</span> Shape <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SphericCow<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span> 0x000000, <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">80</span> , <span style="color: #cc66cc;">70</span> , <span style="color: #cc66cc;">30</span> <span style="color: #66cc66;">&#41;</span>; </p>
<p>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></p>
<p>&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp;<br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>El segundo archivo, llamado <b>MyFirstProgram.as</b>, es la aplicación en sí, que utiliza nuestra clase anterior y pone también un pequeño texto:</p>
<div class="syntax_hilite">
<div id="actionscript-40">
<div class="actionscript">package <span style="color: #66cc66;">&#123;</span></p>
<p>&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> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;</p>
<p>&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//&nbsp; Main class</span></p>
<p>&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyFirstProgram <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span><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> MyFirstProgram<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> title:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"My first Program!"</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>title<span style="color: #66cc66;">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> sphericCow:SphericCow = <span style="color: #000000; font-weight: bold;">new</span> SphericCow<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span> sphericCow <span style="color: #66cc66;">&#41;</span>;</p>
<p>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p>&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></p>
<p><span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<h4>Compilando nuestro programa</h4>
<p>Se compila con:</p>
<div class="syntax_hilite">
<div id="text-41">
<div class="text">/usr/local/bin/flex3/bin/mxmlc MyFirstProgram.as</div>
</div>
</div>
<p></p>
<p>o si lo instalamos en nuestro home:</p>
<div class="syntax_hilite">
<div id="text-42">
<div class="text">$HOME/flex3/bin/mxmlc MyFirstProgram.as</div>
</div>
</div>
<p></p>
<p>El cual creará un archivo <b>MyFirstProgram.swf</b>, el cual podemos arrastrar a nuestro navegador firefox para verlo en acción. Por supuesto, podemos agregar la ruta al archivo .bashrc para evitar el tener que escribir las rutas completas al compilar.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/217/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Juego de fútbol soccer multiusuario</title>
		<link>http://www.machin.com.mx/archives/196</link>
		<comments>http://www.machin.com.mx/archives/196#comments</comments>
		<pubDate>Mon, 28 Jan 2008 08:08:03 +0000</pubDate>
		<dc:creator>Jorge Machin</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Arqueología Machinesca]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Portafolio]]></category>
		<category><![CDATA[Videojuegos]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Soccer]]></category>

		<guid isPermaLink="false">http://www.machin.com.mx/archives/196</guid>
		<description><![CDATA[<p>Después de nuestros primeros pininos en juegos multiusuarios de acción, en el año de 2003 tuvimos la oportunidad de desarrollar un juego de fútbol para las campañas de Nike. Esta vez cambiamos el cliente programado en applets de Java a Flash para facilitar su programación, aumentar su velocidad y tener un mayor impacto visual en cuanto animaciones y efectos. Fué todo un éxito y estuvo presente en varias campañas de <strong>Nike</strong>, <strong>Santander</strong>, <strong>Coca~Cola</strong> y hasta la fecha  sigue en línea en el mundo <strong>Virtual Etnia</strong> (2010). </p>
<p align="center">
<div class="igallery"><img src="/iGallery/futbol/Fut-01.jpg" alt="" id="584683"  title="" /><br /><a href="javascript:swapPhoto('/iGallery/futbol/Fut-01.jpg','584683')"><img src="/iGallery/futbol/TN-Fut-01.jpg" width="56" height="42" alt="" title="" /></a><a href="javascript:swapPhoto('/iGallery/futbol/Fut-02.jpg','584683')"><img src="/iGallery/futbol/TN-Fut-02.jpg" width="56" height="42" alt="" title="" /></a><a href="javascript:swapPhoto('/iGallery/futbol/Fut-03.jpg','584683')"><img src="/iGallery/futbol/TN-Fut-03.jpg" width="56" height="42" alt="" title="" /></a></div>
</p>
<p>En una campaña memorable fue puesto en la portada del portal internacional de Nike por lo que tuvimos visitas de Estados Unidos, Canada, Brasil y México. Fue muy divertido ver como los niños se retaban y se burlban del perdedor perfectamente a pesar de la barrera del lenguaje. Los juegos eran rapídisimos a pesar de que en esa época los visitantes entraban con modems de 56kbps.</p>
<p>Muchas gracias a Xquizo por facilitar los pantallazos.</p>

]]></description>
			<content:encoded><![CDATA[<p>Después de nuestros primeros pininos en juegos multiusuarios de acción, en el año de 2003 tuvimos la oportunidad de desarrollar un juego de fútbol para las campañas de Nike. Esta vez cambiamos el cliente programado en applets de Java a Flash para facilitar su programación, aumentar su velocidad y tener un mayor impacto visual en cuanto animaciones y efectos. Fué todo un éxito y estuvo presente en varias campañas de <strong>Nike</strong>, <strong>Santander</strong>, <strong>Coca~Cola</strong> y hasta la fecha  sigue en línea en el mundo <strong>Virtual Etnia</strong> (2010). </p>
<p align="center">
<div class="igallery"><img src="/iGallery/futbol/Fut-01.jpg" alt="" id="396768"  title="" /><br /><a href="javascript:swapPhoto('/iGallery/futbol/Fut-01.jpg','396768')"><img src="/iGallery/futbol/TN-Fut-01.jpg" width="56" height="42" alt="" title="" /></a><a href="javascript:swapPhoto('/iGallery/futbol/Fut-02.jpg','396768')"><img src="/iGallery/futbol/TN-Fut-02.jpg" width="56" height="42" alt="" title="" /></a><a href="javascript:swapPhoto('/iGallery/futbol/Fut-03.jpg','396768')"><img src="/iGallery/futbol/TN-Fut-03.jpg" width="56" height="42" alt="" title="" /></a></div>
</p>
<p>En una campaña memorable fue puesto en la portada del portal internacional de Nike por lo que tuvimos visitas de Estados Unidos, Canada, Brasil y México. Fue muy divertido ver como los niños se retaban y se burlban del perdedor perfectamente a pesar de la barrera del lenguaje. Los juegos eran rapídisimos a pesar de que en esa época los visitantes entraban con modems de 56kbps.</p>
<p>Muchas gracias a Xquizo por facilitar los pantallazos.</p>

<p></p>]]></content:encoded>
			<wfw:commentRss>http://www.machin.com.mx/archives/196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
