<?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>Quatrecentquatre &#187; ActionScript 3</title>
	<atom:link href="http://blog.quatrecentquatre.com/category/as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.quatrecentquatre.com</link>
	<description>3437 St-Laurent, Montréal, Québec, H2X 2T6, / Téléphone : 514-303-6810</description>
	<lastBuildDate>Mon, 05 Jul 2010 20:59:49 +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>Concoctez votre soirée!</title>
		<link>http://blog.quatrecentquatre.com/2009/09/17/concoctez-votre-soiree/</link>
		<comments>http://blog.quatrecentquatre.com/2009/09/17/concoctez-votre-soiree/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:12:40 +0000</pubDate>
		<dc:creator>Mathieu</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Réalisation]]></category>

		<guid isPermaLink="false">http://blog.quatrecentquatre.com/?p=288</guid>
		<description><![CDATA[Notre dernière réalisation est en ligne sur http://www.exceldor.ca/.  C’est un petit module flash qui s’appel le « concocteur de soirée » permettant aux usagers de se bâtir un souper idéal.
Ce projet à été réalisé pour l’agence Saint-Jacques Vallée young &#38; Rubicam.
]]></description>
			<content:encoded><![CDATA[<p>Notre dernière réalisation est en ligne sur <a href="http://www.exceldor.ca/">http://www.exceldor.ca/</a>.  C’est un petit module flash qui s’appel le « concocteur de soirée » permettant aux usagers de se bâtir un souper idéal.</p>
<p>Ce projet à été réalisé pour l’agence Saint-Jacques Vallée young &amp; Rubicam.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quatrecentquatre.com/2009/09/17/concoctez-votre-soiree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Utilisation de SWFAddress à travers le NavigationManager</title>
		<link>http://blog.quatrecentquatre.com/2009/06/08/utilisation-de-swfaddress-a-travers-le-navigation-manager/</link>
		<comments>http://blog.quatrecentquatre.com/2009/06/08/utilisation-de-swfaddress-a-travers-le-navigation-manager/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 22:01:47 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tout et Rien]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[NavigationManager]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Outil]]></category>
		<category><![CDATA[SWFAddress]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://blog.quatrecentquatre.com/?p=209</guid>
		<description><![CDATA[Le NavigationManager de QuatreCentQuatre est une enveloppe ou un Proxy qui sert à titre d’interface à la classe SWFAddress de Asual afin de mieux contrôler son comportement et d’en étendre les fonctionnalités.
SWFAddress d'Asual
SWFAddress est une combinaison de techniques permettant, à travers des classes Javascript et Actionscript, le deep-linking (la possibilité d’accéder à des sections ou [...]]]></description>
			<content:encoded><![CDATA[<p>Le NavigationManager de QuatreCentQuatre est une enveloppe ou un Proxy qui sert à titre d’interface à la classe SWFAddress de Asual afin de mieux contrôler son comportement et d’en étendre les fonctionnalités.</p>
<p><strong>SWFAddress d'Asual</strong></p>
<p><a href="http://www.asual.com/swfaddress/">SWFAddress</a> est une combinaison de techniques permettant, à travers des classes Javascript et Actionscript, le deep-linking (la possibilité d’accéder à des sections ou des pages directement à partir de la barre d’adresse du fureteur) dans des sites programmés en Flash.  Cette technique, en plus de permettre l’utilisation de signets et des boutons Suivant et Précédent du fureteur, est une des meilleures solutions afin d’optimiser son site pour les moteurs de recherche.</p>
<p><img class="aligncenter size-full wp-image-211" title="SWFAddress" src="http://blog.quatrecentquatre.com/wp-content/uploads/2009/06/caption1.gif" alt="SWFAddress" width="397" height="176" /></p>
<p>Afin d’utiliser <a href="http://www.asual.com/swfaddress/">SWFAddress</a>, il suffit d’intégrer l’outil dans le HTML de la façon suivante :</p>
<pre class="javascript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;library/swfobject.js&quot;</span>&gt;&lt;/script&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;library/swfaddress.js&quot;</span>&gt;&lt;/script&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span>&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #003366; font-weight: bold;">var</span> flashvars = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #003366; font-weight: bold;">var</span> params = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #003366; font-weight: bold;">var</span> attributes = <span style="color: #66cc66;">&#123;</span>id:<span style="color: #3366CC;">&quot;flashMovie&quot;</span><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	swfobject.<span style="color: #006600;">embedSWF</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;navigationExample.swf&quot;</span>, <span style="color: #3366CC;">&quot;alternateContent&quot;</span>, <span style="color: #3366CC;">&quot;100%&quot;</span>, <span style="color: #3366CC;">&quot;100%&quot;</span>, <span style="color: #3366CC;">&quot;9.0.124&quot;</span>, <span style="color: #003366; font-weight: bold;">false</span>, flashvars, params, attributes<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/script&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p><strong>UTILISATION DE SWFADDRESS</strong></p>
<p>L’intégration dans Flash s’effectue ensuite comme suit :</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> :<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	SWFAddress.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>SWFAddressEvent.<span style="color: #006600;">CHANGE</span>, handleChange, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//Exemple de changement de page, mais une page ‘’/’’ est reçue par défaut au départ de l’application</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	SWFAddress.<span style="color: #006600;">setValue</span><span style="color: #66cc66;">&#40;</span>‘’page1’’<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleChange<span style="color: #66cc66;">&#40;</span>evt:SWFAddressEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> laSection:<span style="color: #0066CC;">String</span> = evt.<span style="color: #006600;">value</span>; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//La seule information obtenue est un string, une condition doit donc être programmée</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">switch</span><span style="color: #66cc66;">&#40;</span>laSection<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #b1b100;">case</span> ‘’X’’ :</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//opération afin de changer de section</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//Changer le titre de la page (défini manuellement)</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #808080; font-style: italic;">//Vérifier si c’est la section demandée n’existe pas, etc…</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p><a href="http://www.asual.com/swfaddress/">SWFAddress</a> présente aussi plusieurs outils pour, par exemple :</p>
<ul>
<li>Ouvrir des liens externes</li>
<li>Reculer dans l’historique</li>
<li>Monter de niveau hiérarchique (section1/section1-1 vers section1/)</li>
<li>Changer le titre de la page (dans quel cas SWFAddress doit être déclaré sous la balise  dans le html.</li>
</ul>
<p><strong>Note</strong> : <a href="http://www.asual.com/swfaddress/">SWFAddress</a>, quand il est utilisé adéquatement, remplace et surclasse le moteur d’indexation des fichiers swf des moteurs de recherche populaires tels que Google, c’est pourquoi il est important d’inclure un fichier robots.txt afin d’empêcher ceux-ci d’indexer automatiquement les fichiers gérés par <a href="http://www.asual.com/swfaddress/">SWFAddress</a> ou le NavigationManager.<br />
Exemple de fichier robots.txt :</p>
<pre class="text"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Sitemap: http://www.asual.com/sitemap.xml</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">User-agent: *</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Disallow: /*.swf*</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p> &nbsp;<br />
 &nbsp;<br />
<strong>NAVIGATIONMANGER</strong></p>
<p>Le mandat de <a href="http://www.asual.com/swfaddress/">SWFAddress</a> est de permettre le deep-linking et cet objectif est atteint. Toutefois, des mécanismes personnalisés doivent être mis en place afin d’en régir le fonctionnement ainsi que les cas d’exception.  Que faites-vous si vous voulez que la description des sections soit chargée à l’externe, passer à la section suivante, assigner des descriptions aux sections, obtenir les infos de son parent ou encore que vous désirez savoir à quel niveau hiérarchique se trouve la section courante?  Vous devrez programmer vos propres mécanismes ou utiliser le NavigationManager.</p>
<p>Propriétés et méthodes publiques</p>
<p><div id="attachment_232" class="wp-caption aligncenter" style="width: 722px"><img class="size-full wp-image-232" title="NavigationManager" src="http://blog.quatrecentquatre.com/wp-content/uploads/2009/06/caption2.gif" alt="Structure du NavigationManager de QuatreCentQuatre" width="712" height="606" /><p class="wp-caption-text">Structure du NavigationManager de QuatreCentQuatre</p></div><br />
 &nbsp;<br />
 &nbsp;<br />
Étant donné que le NavigationManager est une enveloppe à SWFAddress, les classes de ce dernier seront requises et l’intégration Javascript s’effectuera de la même façon.<br />
 &nbsp;<br />
 &nbsp;</p>
<pre class="javascript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;library/swfobject.js&quot;</span>&gt;&lt;/script&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;library/swfaddress.js&quot;</span>&gt;&lt;/script&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span>&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #003366; font-weight: bold;">var</span> flashvars = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #003366; font-weight: bold;">var</span> params = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #003366; font-weight: bold;">var</span> attributes = <span style="color: #66cc66;">&#123;</span>id:<span style="color: #3366CC;">&quot;flashMovie&quot;</span><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	swfobject.<span style="color: #006600;">embedSWF</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;navigationExample.swf&quot;</span>, <span style="color: #3366CC;">&quot;alternateContent&quot;</span>, <span style="color: #3366CC;">&quot;100%&quot;</span>, <span style="color: #3366CC;">&quot;100%&quot;</span>, <span style="color: #3366CC;">&quot;9.0.124&quot;</span>, <span style="color: #003366; font-weight: bold;">false</span>, flashvars, params, attributes<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/script&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Le NavigationManager fonctionne selon un schéma XML qui peut être défini manuellement ou chargé à l’externe, voici un exemple de la structure du XML requis.</p>
<pre class="xml"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;response<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;body<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;page<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;default&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;description<span style="font-weight: bold; color: black;">&gt;</span></span></span>Section 1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tag<span style="font-weight: bold; color: black;">&gt;</span></span></span>section1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tag<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span>sectionclasses.Section1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;subitems<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">					<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;normal&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">						<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;description<span style="font-weight: bold; color: black;">&gt;</span></span></span>Ceci est la section 1.1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">						<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tag<span style="font-weight: bold; color: black;">&gt;</span></span></span>section1-1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tag<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">						<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span>sectionclasses.Section1_1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">					<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/item<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">					<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;item</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;normal&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">						<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;description<span style="font-weight: bold; color: black;">&gt;</span></span></span>Ceci est la section 1.2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">						<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tag<span style="font-weight: bold; color: black;">&gt;</span></span></span>section1-2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tag<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">						<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span>sectionclasses.Section1_2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">					<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/item<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/subitems<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/item<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span> item <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;notfound&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;description<span style="font-weight: bold; color: black;">&gt;</span></span></span>Section  not found<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tag<span style="font-weight: bold; color: black;">&gt;</span></span></span>sectionnotfound<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tag<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">				<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span>sectionclasses.Section1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ressource<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/</span> item<span style="font-weight: bold; color: black;">&gt;</span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/page<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/body<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/response<span style="font-weight: bold; color: black;">&gt;</span></span></span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Les informations d’une section doivent se retrouver à l’intérieur d’une balise &lt;item&gt;  et doivent se situer à l’intérieur du node &lt;page&gt; qui sert de conteneur aux informations de la navigation.</p>
<p>Les informations à retrouver sont les suivantes :</p>
<ul>
<li>L’attribut type qui peut valoir normal au default. Une valeur default indique que cette section est celle qui sera chargée par défaut lors de l’initialisation du système (au lieu de « / »)</li>
<li>La balise tag, qui sera utilisée comme identifiant dans la barre d’addresse et pour google analytics.</li>
<li>La balise description, qui est une valeur qui peut servir, par exemple, à nommer le bouton qui mènera à la section ou encore au titre de la page si la propriété useDescriptionAsTitle a une valeur de true.</li>
<li>La balise ressource, que vous pourrez utiliser afin de spécifier à quelle ressource (classe, fichier swf ou lien externe) la section est liée.</li>
<li>Une balise subitems optionnelle qui contiendra des nodes items qui seront considérés les enfants de l’item courant.</li>
</ul>
<p>Notez qu’un deuxième node de structure similaire mais d’un type notfound peut être placé à la racine de l’arbre afin de régir la section utilisée lorsqu’une page reçue n’est pas définie dans le XML.  Si ce node facultatif n’est pas défini, la page par défaut sera utilisée.<br />
<br />
<strong>UTILISATION DU NAVIGATION MANAGER</strong></p>
<p>L’intégration dans Flash est simple : </p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> :<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	NavigationManager.<span style="color: #006600;">instance</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>NavigationManagerEvent.<span style="color: #006600;">SECTION_CHANGED</span>, handleSectionChanged, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	NavigationManager.<span style="color: #006600;">instance</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>NavigationManagerEvent.<span style="color: #006600;">MENU_XML_LOAD_COMPLETE</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		handleMenuLoadComplete, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	NavigationManager.<span style="color: #006600;">instance</span>.<span style="color: #006600;">loadMenuXML</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>‘’<span style="color: #0066CC;">menu</span>.<span style="color: #0066CC;">xml</span>’’<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleSectionChanged <span style="color: #66cc66;">&#40;</span>evt: NavigationManagerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//Référence vers la section courante</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> laSection:SectionData = evt.<span style="color: #006600;">section</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//ou</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> laSection2:SectionData =NavigationManager.<span style="color: #006600;">instance</span>.<span style="color: #006600;">getCurrentSection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//On pourrait créer une section à partir de la ressource :</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> sectionClass:<span style="color: #000000; font-weight: bold;">Class</span> = getDefinitionByName<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">section</span>.<span style="color: #006600;">ressource</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #000000; font-weight: bold;">Class</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> currentSection &lt;img src=<span style="color: #ff0000;">'http://blog.quatrecentquatre.com/wp-includes/images/smilies/icon_biggrin.gif'</span> alt=<span style="color: #ff0000;">':D'</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">'wp-smiley'</span> /&gt; isplayObject = <span style="color: #000000; font-weight: bold;">new</span> sectionClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as SectionObject</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	addChild<span style="color: #66cc66;">&#40;</span>currentSection<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><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;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleMenuLoadComplete <span style="color: #66cc66;">&#40;</span>evt: NavigationManagerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//Effectue les operations afin de créer le menu</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> iterator:ISubSectionIterator = NavigationManager.<span style="color: #006600;">instance</span>.<span style="color: #006600;">sectionsList</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">length</span>:<span style="color: #0066CC;">int</span> = iterator.<span style="color: #006600;">numSubSections</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i &lt; <span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #000000; font-weight: bold;">var</span> laSection:SectionData = iterator.<span style="color: #006600;">getSubSectionAt</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>
Comme on peut le constater, il peut être pratique d’écouter sur l’événement MENU_XML_LOAD_COMPLETE  afin de savoir si le XML est chargé alors que l’événement SECTION_CHANGED est utile afin de savoir quand une section a changé. Notez que l’événement SECTION_CHANGED  ne sera jamais diffusé avant que la fin du chargement du XML externe ou avant l’assignation manuelle du XML à travers la fonction NavigationManager.instance. sectionsList. setMenuStructure().<br />
<br/><br />
<strong>PRATIQUES À ADOPTER</strong></p>
<ul>
<li>Dans les items associée à une section (un bouton de menu par exemple) implémentez une propriété qui entreposera une référence vers le SectionData de la section qu’ils représentent afin de faciliter l’utilisation du système. En plus, l’espace mémoire requis sera plus petit qu’une valeur textuelle de son chemin enregistrée dans un String. </li>
<li>Si vous avez plus d’un menu pour la navigation, vous pouvez les englober dans des nodes <item> à la racine du groupe
<page> qui serviront ni plus ni moins de conteneurs aux sous-sections qu’ils contiendront.  Pour y accéder individuellement lors de la création dynamique des menus, vous pouvez utiliser la fonction NavigationManager.instance.sectionsList.getSectionByTag(‘’conteneur X’’) à partir duquel vous pourrez accéder à ses enfants.  De plus, la structure dans Google Analytics n’en sera que plus claire étant donné que la section sera identifée comme suit : conteneurX/sectionY </li>
</ul>
<p> &nbsp;<br />
 &nbsp;<br />
<strong>BIBLIOGRAPHIE</strong><br />
SWFAddress Bad Practices<br />
<a href="http://www.asual.com/blog/swfaddress/2007/05/18/swfaddress-bad-practices.html">http://www.asual.com/blog/swfaddress/2007/05/18/swfaddress-bad-practices.html</a><br />
SWFAddress and robots.txt<br />
<a href="http://www.asual.com/blog/swfaddress/2008/11/25/swfaddress-and-robots-txt.html">http://www.asual.com/blog/swfaddress/2008/11/25/swfaddress-and-robots-txt.html</a></p>
<p>Télécharger la version 1.0 du NavigationManager:<br />
<a href="http://quatrecentquatre.com/clients/public/404/NavigationManager1.0.zip">LIEN</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quatrecentquatre.com/2009/06/08/utilisation-de-swfaddress-a-travers-le-navigation-manager/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Librairies externes en Flash</title>
		<link>http://blog.quatrecentquatre.com/2009/05/31/librairies-externes-en-flash/</link>
		<comments>http://blog.quatrecentquatre.com/2009/05/31/librairies-externes-en-flash/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 00:26:25 +0000</pubDate>
		<dc:creator>Jocelyn</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Réalisation]]></category>
		<category><![CDATA[cs4]]></category>

		<guid isPermaLink="false">http://blog.quatrecentquatre.com/?p=166</guid>
		<description><![CDATA[La problématique des productions Flash multi fichiers
Lors du développement d’un site Flash à fichiers multiples, une problématique apparait très rapidement dans le processus de développement : La réutilisation des même éléments (graphiques, classes, composants) dans plusieurs des fichiers du site. Le problème vient entre autre du fait que chaque fichier  SWF a une librairie de [...]]]></description>
			<content:encoded><![CDATA[<p><strong>La problématique des productions Flash multi fichiers</strong></p>
<p>Lors du développement d’un site Flash à fichiers multiples, une problématique apparait très rapidement dans le processus de développement : La réutilisation des même éléments (graphiques, classes, composants) dans plusieurs des fichiers du site. Le problème vient entre autre du fait que chaque fichier  SWF a une librairie de graphique, composant, et classes unique. De ce fait, si on veut utiliser le même graphique dans deux fichiers SWF, ont doit donc recopier les mêmes éléments qu’on désire réutilisable dans toutes les librairies nécessaires. Cela implique une redondance des éléments et donc une multiplication du poids des fichiers.</p>
<p>Avant  l’arrivé de Flash CS4 et de l’ActionScript 3, il n’y avait pas beaucoup de solution pour contourner le problème. Ont pouvait utiliser un fichier exclude.xml au même endroit que notre fichier FLA pour définir les classes qui ne devait pas être compilé  dans le fichier SWF. Ainsi on pouvait exclure les classes qui étaient dupliqué à travers plusieurs fichiers SWF de l’application. Le problème était qu’on devait quand même recopier les éléments graphiques dans chacun des ces fichiers FLA pour ne pas avoir des erreurs de compilation sur des éléments inexistant dans la librairie.</p>
<div id="attachment_170" class="wp-caption aligncenter" style="width: 469px">
<div class="mceTemp mceIEcenter">
<dl id="attachment_170" class="wp-caption aligncenter" style="width: 469px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-170" style="margin-top:5px" title="Flash multi fichier" src="http://blog.quatrecentquatre.com/wp-content/uploads/2009/05/untitled-1.gif" alt="Exemple de la problématique multi fichiers" width="459" height="290" /></dt>
</dl>
</div>
<p><p class="wp-caption-text">Example de la problématique</p></div><br />
<br/><br />
<strong>Les modules </strong></p>
<p>Depuis la sortie de la suite CS4, il est maintenant possible d’intégrer des librairies externes pour la compilation directement à partir de l’IDE de Flash. Il est donc maintenant possible de créer une librairie d’élément (graphique, composant, classes) qu’on désirer partager à travers plusieurs fichiers mais qui ne seront pas compiler (injecter) dans le fichier final d’un SWF donné. L’arrivée des modules élimine donc la redondance de poids avec la réplication des éléments partagés dans plusieurs librairies des fichiers FLA.</p>
<p>Pour créer une application multi fichiers avec module, ont doit donc commencer par créer le module en tant que tel et ensuite ce module est charger en premier par le fichier principal (celui qui s’occupe du chargement des fichiers subséquents) et ensuite procède au chargement des sections ou sous-section de l’application. Dès que le module est chargé, les sections et sous-sections ont directement accès aux ressources de celui-ci. Le module doit cependant être chargé de façon à ce que « l’Application Domain » soit le même que le fichier principale pour que les ressources soient accessible.</p>
<div id="attachment_170" class="wp-caption aligncenter" style="width: 469px">
<div class="mceTemp mceIEcenter">
<dl id="attachment_191" class="wp-caption aligncenter" style="width: 469px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-191" style="margin-top:5px" title="Example avec module" src="http://blog.quatrecentquatre.com/wp-content/uploads/2009/05/untitled-2.gif" alt="Example avec module" width="459" height="350" /></dt>
</dl>
</div>
<p><p class="wp-caption-text">Example avec module</p></div><br />
<br/><br />
<strong>Création d’un module</strong><br />
Le module se crée en deux étapes. En premier lieu, on crée un fichier FLA et on y place tous les éléments réutilisables que nous voulons partager à travers les différents fichiers SWF du site ou de l’application. Ensuite, nous exportons le tout en format SWC (fichier SWF compressé par ZIP) et SWF. À partir de cet instant, le module est donc terminer et prêt à être utiliser directement dans les autres fichiers.</p>
<p><strong>Exemple de création</strong></p>
<ul>
<li>On crée un fichier “module.fla” dans lequel on inclut tout les éléments (graphiques, composants, classes, etc...) à partager</li>
<li>On exporte ce fichier en “module.swc”</li>
<li>On compile ce fichier en ”module.swf”</li>
<li>Pour tous les fichiers FLA qui doivent utiliser ces éléments, inclure le SWC dans les paramètres de publication sous l’onglet “External Library Path”</li>
<li>Dans votre fichier principal, charger le fichier “module.swf” en premier lieu, et ensuite procéder au chargement des sections et sous-section selon le besoin</li>
</ul>
<p>En mode développement, on peut bien tester les sections et sous-sections en chargeant directement le module dans ces fichiers avant toute exécution du code pour pouvoir bien tester les fonctionnalités. Lors de la mise en ligne, on retire tout simplement le chargement du module dans les sections et sous-sections. C'est présentement la meilleure solution pour le travail en multi fichiers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quatrecentquatre.com/2009/05/31/librairies-externes-en-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
