<?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>onestic &#187; flash banner</title>
	<atom:link href="http://onestic.com/tag/flash-banner/feed/" rel="self" type="application/rss+xml" />
	<link>http://onestic.com</link>
	<description>blog de onestic</description>
	<lastBuildDate>Wed, 30 Jun 2010 10:37:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Banner en Flash con Magento</title>
		<link>http://onestic.com/banner-en-flash-con-magento/</link>
		<comments>http://onestic.com/banner-en-flash-con-magento/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 14:30:52 +0000</pubDate>
		<dc:creator>Sergio Baixauli</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[flash banner]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://onestic.com/?p=508</guid>
		<description><![CDATA[Para insertar un banner en flash en una tienda realizada con Magento vamos a necesitar los siguientes elementos:
Resumen

	El banner  
	 Libreria .js
	 Crear un Bloque estático
	 Modificar el header.phtml

Paso 1. Creamos el banner y lo subimos por ejemplo a una carpeta en la raíz de nuestra tienda llamada "swf"  (public_html/swf)

Paso 2. Editamos el [...]]]></description>
			<content:encoded><![CDATA[Para insertar un <strong>banner en flash</strong> en una tienda realizada con <strong>Magento </strong>vamos a necesitar los siguientes elementos:
<strong>Resumen</strong>
<ul>
	<li>El banner <img src='http://onestic.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
	<li> Libreria .js</li>
	<li> Crear un Bloque estático</li>
	<li> Modificar el header.phtml</li>
</ul>
<strong>Paso 1.</strong> Creamos el banner y lo subimos por ejemplo a una carpeta en la raíz de nuestra tienda llamada "swf"  (public_html/swf)

<strong>Paso 2.</strong> Editamos el ficheros page.xml de nuestro tema. (public_html/app/design/frontend/default/THEME/layout) e incluimos la siguiente línea justo debajo de "<block type="page/html_head" name="head" as="head">"

<div class="igBar"><span id="lxml-4"><a href="#" onclick="javascript:showPlainTxt('xml-4'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">XML:</span><br /><div id="xml-4">
<div class="xml"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;action</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"addJs"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script<span style="font-weight: bold; color: black;">&gt;</span></span></span>flash/AC_RunActiveContent.js<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/action<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div></li></ol></div>
</div></div><br />

Creamos una carpeta en la raiz de nuestra tienda "js/flash" (public_html/js/flash) y ponemos el fichero AC_RunActiveContent.js

Descargar fichero<a href="http://onestic.com/wp-content/uploads/2009/10/AC_RunActiveContent.js"> AC_RunActiveContent</a>

<strong>Paso 3.</strong> Cremaos un bloque estático. Desde el administrador -> CMS -> Bloques estáticos.

Creamos un nuevo bloque estático y lo llamamos "flash_banner". Con este nombre después lo referenciaremos.
El contenido del bloque es el siguiente:

<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-5">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color:#FF0000;">"text/javascript"</span>&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AC_FL_RunContent<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'codebase'</span>,<span style="color:#FF0000;">'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0'</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'width'</span>,<span style="color:#FF0000;">'710'</span>,</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'height'</span>,<span style="color:#FF0000;">'285'</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'src'</span>,<span style="color:#FF0000;">'../swf/intro.swf'</span>,</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'quality'</span>,<span style="color:#FF0000;">'high'</span>,</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'menu'</span>,<span style="color:#FF0000;">'false'</span>,<span style="color:#FF0000;">'base'</span>,<span style="color:#FF0000;">'.'</span>,</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'pluginspage'</span>,<span style="color:#FF0000;">'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash'</span>,<span style="color:#FF0000;">'movie'</span>,<span style="color:#FF0000;">'../swf/intro'</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">//end AC code</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;/script&gt;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;noscript&gt;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;object classid=<span style="color:#FF0000;">"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"</span> codebase=<span style="color:#FF0000;">"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"</span> width=<span style="color:#FF0000;">"710"</span> height=<span style="color:#FF0000;">"285"</span> title=<span style="color:#FF0000;">"name_of_your_flash_banner"</span>&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;param name=<span style="color:#FF0000;">"movie"</span> value=<span style="color:#FF0000;">"../swf/intro"</span> /&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;param name=<span style="color:#FF0000;">"quality"</span> value=<span style="color:#FF0000;">"high"</span> /&gt;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;param name=<span style="color:#FF0000;">"menu"</span> value=<span style="color:#FF0000;">"false"</span>&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;param name=<span style="color:#FF0000;">"wmode"</span> value=<span style="color:#FF0000;">"transparent"</span>&gt;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;param name=<span style="color:#FF0000;">"base"</span> value=<span style="color:#FF0000;">"."</span> /&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;embed src=<span style="color:#FF0000;">"../swf/intro.swf"</span> quality=<span style="color:#FF0000;">"high"</span> pluginspage=<span style="color:#FF0000;">"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"</span> type=<span style="color:#FF0000;">"application/x-shockwave-flash"</span> width=<span style="color:#FF0000;">"710"</span> height=<span style="color:#FF0000;">"285"</span>&gt;&lt;/embed&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/object&gt;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/noscript&gt; </div></li></ol></div>
</div></div><br />

Cambiar las medidas (width y height) para ajustarlos a vuestras necesidades.

<strong>Paso 4.</strong> Editamos el fichero donde queremos cargar el Banner en Flash. En nuestro caso el header.phtml (/public_html/app/design/frontend/default/THEME/template/page/html/header.phtml)
Incluimos las siguientes líneas. Con esto nos aseguramos de que el banner únicamente se verá en la pantalla de inicio (home) y que además el Bloque estático se llama "flash_banner"

<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-6">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$page</span> = Mage::<span style="color:#006600;">app</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getFrontController</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getRequest</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getRouteName</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$page</span> == <span style="color:#FF0000;">'cms'</span><span style="color:#006600; font-weight:bold;">&#41;</span>:</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>Mage::<span style="color:#006600;">getSingleton</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'cms/page'</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getIdentifier</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>==<span style="color:#FF0000;">'home'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getLayout</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">createBlock</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'cms/block'</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">setBlockId</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'flash_banner'</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">toHtml</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#616100;">endif</span>;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#000000; font-weight:bold;">?&gt;</span> </div></li></ol></div>
</div></div><br />

<strong>Paso 5.</strong> Recargar la página (ojo con la caché) y comprobar que todo sale correctamente.

<a href="http://onestic.com/wp-content/uploads/2009/10/banner-flash.jpg"><img class="alignnone size-full wp-image-521" title="banner-flash" src="http://onestic.com/wp-content/uploads/2009/10/banner-flash.jpg" alt="banner-flash" width="575" height="271" /></a>]]></content:encoded>
			<wfw:commentRss>http://onestic.com/banner-en-flash-con-magento/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>