<?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"
	>

<channel>
	<title>meta for(...) &#187; Actionscript3</title>
	<atom:link href="http://www.meta-for.net/tag/as3/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.meta-for.net</link>
	<description>Actionscript poetic code</description>
	<pubDate>Tue, 20 Jul 2010 21:08:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Face.com API, le trombinoscope en AS3</title>
		<link>http://www.meta-for.net/157/facecom-api-le-trombinoscope-en-as3/</link>
		<comments>http://www.meta-for.net/157/facecom-api-le-trombinoscope-en-as3/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 21:08:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Actionscript3]]></category>

		<category><![CDATA[Experimentation]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Non classé]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[detection]]></category>

		<category><![CDATA[face]]></category>

		<category><![CDATA[library]]></category>

		<category><![CDATA[recognition]]></category>

		<guid isPermaLink="false">http://www.meta-for.net/?p=157</guid>
		<description><![CDATA[Voilà un petit article pour dire que je viens de publier un portage de l&#8217;API face.com qui permet de faire de la détection et de la reconnaissance faciale sur une ou plusieurs images, le tout en AS3. C&#8217;est du WIP, donc attendez-vous à quelques bugs, ou à certains appels manquant. D&#8217;ailleurs n&#8217;hésitez pas à m&#8217;envoyer [...]]]></description>
			<content:encoded><![CDATA[<p>Voilà un petit article pour dire que je viens de publier un portage de l&#8217;API <a title="Face official page" href="http://www.face.com" target="_self">face.com</a> qui permet de faire de la détection et de la reconnaissance faciale sur une ou plusieurs images, le tout en AS3. C&#8217;est du WIP, donc attendez-vous à quelques bugs, ou à certains appels manquant. D&#8217;ailleurs n&#8217;hésitez pas à m&#8217;envoyer vos retours.</p>
<p>L&#8217;utilisation est relativement simple. Allez faire un tour sur <a title="Recognition how-to" href="http://developers.face.com/docs/recognition-howto/" target="_blank">la doc de face.com</a> pour comprendre le fonctionnement de leur API. Pour la suite , je vous mets un petit tuto sur la marche à suivre pour utiliser la librairie dans un namespace privé. Je ferai pareil pour l&#8217;utilisation avec facebook connect dès que j&#8217;ai un petit peu de temps, ce qui vous permettra de jouer directement avec les tags des photos du célèbre réseau social. Donc &#8220;stay tuned&#8221; si c&#8217;est quelque chose qui vous intéresse.</p>
<h3>utilisation</h3>
<p>Premièrement rendez-vous sur le <a title="Face developer page" href="http://developers.face.com/" target="_blank">site developpeur de face.com</a> et créez un compte. Sur la page de votre compte, ajoutez une nouvelle application et spécifiez au besoin l&#8217;url du site. Notez ensuite l&#8217;API Key ainsi que l&#8217;API Secret, pour le reste laissé tout décoché. De retour sur votre compte ajouté un namespace, que vous réglerez en privé pour l&#8217;instant. Un namespace sur face.com est un comme son nom l&#8217;indique un espace de nom, dans lequel vous ajouterez les personnes à détecter/reconnaître sous la forme id@namespace, pour plus d&#8217;infos <a title="Face uid and namespaces" href="http://developers.face.com/docs/users/" target="_blank">allez ici</a>.</p>
<p>Du côté actionscript enfin. On va procéder en 3 étapes:</p>
<ol>
<li>Détecter un visage dans une image et récupérer son id temporaire( tid )</li>
<li>Enregister le tid dans notre private namespace</li>
<li>Effectuer une reconnaissance sur une autre image pour la comparer avec l&#8217;id stocké</li>
</ol>
<p><strong>Etape 1, la détection.</strong> On va donc détecter un visage sur la photo suivante. <img src='http://www.meta-for.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> Tout rapport avec l&#8217;actualité d&#8217;aujourd&#8217;hui est involontaire&#8230;</p>
<div class="wp-caption aligncenter" style="width: 647px"><a class="imgPost" href="http://static1.purepeople.com/articles/0/24/40/0/@/168118-franck-ribery-637x0-2.jpg"><img title="Franck Ribery content..." src="http://static1.purepeople.com/articles/0/24/40/0/@/168118-franck-ribery-637x0-2.jpg" alt="Franck Ribery content..." width="382" height="290" /></a><p class="wp-caption-text">Franck Ribery content...</p></div>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> net.<span style="color: #006600;">metafor</span>.<span style="color: #006600;">faceapi</span>.<span style="color: #006600;">FaceApi</span>;
	<span style="color: #0066CC;">import</span> net.<span style="color: #006600;">metafor</span>.<span style="color: #006600;">faceapi</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FaceEvent</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> faceApi:FaceApi;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//Créez une insatnce de FaceApi</span>
			faceApi = <span style="color: #000000; font-weight: bold;">new</span> FaceApi<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//Définissez votre apiKey et votre secret</span>
			faceApi.<span style="color: #006600;">apiKey</span> = <span style="color: #ff0000;">&quot;your_api_key&quot;</span>;
			faceApi.<span style="color: #006600;">apiSecret</span> = <span style="color: #ff0000;">&quot;your_api_secret&quot;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Enregistrez un écouteur et appelez la méthode detect() sur recognitionService,</span>
			<span style="color: #808080; font-style: italic;">// avec un Array contenant les urls des images à analyser en paramètre.( ici une seul pour l'exemple )</span>
			<span style="color: #808080; font-style: italic;">// Vous pouvez aussi utiliser uploadAndDetect pour passer directement un Bitmap</span>
			faceApi.<span style="color: #006600;">recognitionService</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> FaceEvent.<span style="color: #006600;">SUCCESS</span> , onDetectSuccess <span style="color: #66cc66;">&#41;</span>;
			faceApi.<span style="color: #006600;">recognitionService</span>.<span style="color: #006600;">detect</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;http://static1.purepeople.com/articles/0/24/40/0/@/168118-franck-ribery-637x0-2.jpg&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onDetectSuccess<span style="color: #66cc66;">&#40;</span> evt : FaceEvent <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			faceApi.<span style="color: #006600;">recognitionService</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span> FaceEvent.<span style="color: #006600;">SUCCESS</span> , onDetectSuccess <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//Récupérer l'id temporaire</span>
			<span style="color: #000000; font-weight: bold;">var</span> tid:<span style="color: #0066CC;">String</span> = evt.<span style="color: #0066CC;">data</span>.<span style="color: #006600;">photos</span><span style="color: #66cc66;">&#91;</span>0<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">tags</span><span style="color: #66cc66;">&#91;</span>0<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">tid</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>Etape 2, sauvegarder l&#8217;id temporaire dans votre private namespace:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Sauvegarder ensuite votre tid , en l'associant au uid de votre choix.</span>
<span style="color: #808080; font-style: italic;">// Respecter bien le syntaxe suivante :  id_de_votre_choix@nom_du_namespace</span>
faceApi.<span style="color: #006600;">tagsService</span>.<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span> tid , <span style="color: #ff0000;">&quot;franck_ribery@nstuto&quot;</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><strong>Etape 3</strong>, et voilà maintenant vous pouvez comparer une nouvelle photo avec le contenu de votre namespace. Celle-ci par exemple:</p>
<div class="wp-caption aligncenter" style="width: 348px"><a class="imgPost" href="http://www.elawords.com/wp-content/uploads/2010/03/Franck-Ribery.jpg"><img title="Franck Ribery toujours content..." src="http://www.elawords.com/wp-content/uploads/2010/03/Franck-Ribery.jpg" alt="Franck Ribery toujours content..." width="338" height="450" /></a><p class="wp-caption-text">Franck Ribery toujours content...</p></div>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Vous pouvez maintenant appeler recognize() sur recognitionService.</span>
<span style="color: #808080; font-style: italic;">// Vous comparez ainsi une nouvelle image, dans ce cas-là avec l'ensemble des tags enregistrer dans le namespace( all@namespace ).</span>
<span style="color: #808080; font-style: italic;">// Vous pouvez aussi le comparer seuleument, avec un tag( ex: franck_ribery@nstuto ).</span>
faceApi.<span style="color: #006600;">recognitionService</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> FaceEvent.<span style="color: #006600;">SUCCESS</span> , onRecoSuccess <span style="color: #66cc66;">&#41;</span>;
faceApi.<span style="color: #006600;">recognitionService</span>.<span style="color: #006600;">recognize</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;http://www.elawords.com/wp-content/uploads/2010/03/Franck-Ribery.jpg&quot;</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;all@nstuto&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Et voilà!!! Si vous faites un trace() de la propriété rawResult de l&#8217;événement vous devriez voir quelque chose comme ça.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
    <span style="color: #3366CC;">&quot;photos&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #3366CC;">&quot;url&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http:<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\/</span>www.elawords.com<span style="color: #000099; font-weight: bold;">\/</span>wp-content<span style="color: #000099; font-weight: bold;">\/</span>uploads<span style="color: #000099; font-weight: bold;">\/</span>2010<span style="color: #000099; font-weight: bold;">\/</span>03<span style="color: #000099; font-weight: bold;">\/</span>Franck-Ribery.jpg&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">&quot;pid&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;F@f39c380996d11b054183916d919c3046_7b6b64e18d6b4e64070dcc7d0f91fd76&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">338</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">&quot;height&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">450</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">&quot;tags&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #009900;">&#123;</span>
                    <span style="color: #3366CC;">&quot;tid&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;TEMP_F@f39c380996d11b054183916d919c3046_7b6b64e18d6b4e64070dcc7d0f91fd76_53.70_48.11_1&quot;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;threshold&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">65</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;uids&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                        <span style="color: #009900;">&#123;</span>
                            <span style="color: #3366CC;">&quot;uid&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;franck_ribery@nstuto&quot;</span><span style="color: #339933;">,</span>
                            <span style="color: #3366CC;">&quot;confidence&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">85</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;gid&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;label&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;confirmed&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;manual&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;tagger_id&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">66.57</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;height&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">50</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;center&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">53.7</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">48.11</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;eye_left&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">36.67</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">41.85</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;eye_right&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">63.16</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">44.67</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;mouth_left&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">34.67</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">65.64</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;mouth_center&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">45.74</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">68.54</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;mouth_right&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">58.32</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">67.66</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;nose&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;x&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">46.99</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;y&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">57.22</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;ear_left&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;ear_right&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;chin&quot;</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;yaw&quot;</span><span style="color: #339933;">:</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1.72</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;roll&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">8.07</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;pitch&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1.91</span><span style="color: #339933;">,</span>
                    <span style="color: #3366CC;">&quot;attributes&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #3366CC;">&quot;face&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;true&quot;</span><span style="color: #339933;">,</span>
                            <span style="color: #3366CC;">&quot;confidence&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1.5809</span>
                        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;gender&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;male&quot;</span><span style="color: #339933;">,</span>
                            <span style="color: #3366CC;">&quot;confidence&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">94</span>
                        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;glasses&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;false&quot;</span><span style="color: #339933;">,</span>
                            <span style="color: #3366CC;">&quot;confidence&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">53</span>
                        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                        <span style="color: #3366CC;">&quot;smiling&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;true&quot;</span><span style="color: #339933;">,</span>
                            <span style="color: #3366CC;">&quot;confidence&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">15</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    <span style="color: #3366CC;">&quot;status&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;success&quot;</span><span style="color: #339933;">,</span>
    <span style="color: #3366CC;">&quot;usage&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;used&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;remaining&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">199</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;limit&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;reset_time_text&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Tue, 20 Jul 2010 16:46:25 +0000&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;reset_time&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1279644385</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Vous trouvez donc une partie uids qui stocke les ids qui ont matché avec votre comparaison. On s&#8217;aperçoit que la photo à bien été reconnue comme franck_ribery@nstuto avec une probabilité de 85%.<br />
Voilou, c&#8217;était un exemple tout simple, à vous de faire joujoux avec maintenant. Essayez avec la photo de Zaia et vous ne devriez pas avoir le même résultat.</p>
<h3>release note</h3>
<ul>
<li> La libraire ne supporte actuellement que les résultats en JSON, mais l&#8217;XML va suivre au plus vite.</li>
<li> L&#8217;authentification facebook est presque entièrement implémentée, je ferai suivre un tuto.</li>
<li> L&#8217;authentification avec Twitter est partiellement implémenter, notamment avec OAuth, vous trouverez une classe dans le package auth vous aidant à l&#8217;implémenter.</li>
<li> Pour passer un bitmap à la place d&#8217;une url, utiliser uploadAndDetect(), uploadAndRecognize, &#8230;</li>
<li> Les méthodes suivantes ne sont pas encore disponibles: tags.add(), tags.get() et tags.remove() . Elles suivront dès que j&#8217;ai un peu de temps.</li>
</ul>
<h3>download</h3>
<p>Vous trouverez les sources <a href="http://github.com/ptitJean/AS3FaceApi">sur mon github</a>.<br />
Pour les autres je vous mets aussi <a href="http://labs.meta-for.net/faceapi/sources.zip">les sources</a> en direct download.<br />
Et pour la doc, <a href="http://labs.meta-for.net/faceapi/documentation/">c&#8217;est ici</a>.( pas encore très fournie, mais ça vient).<br />
N&#8217;oubliez pas de télécharger <a href="http://code.google.com/p/as3crypto/">l&#8217;excellente lib as3crypto</a> si vous utiliser OAuth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meta-for.net/157/facecom-api-le-trombinoscope-en-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>addCallback() et doctype</title>
		<link>http://www.meta-for.net/152/addcallback-et-doctype/</link>
		<comments>http://www.meta-for.net/152/addcallback-et-doctype/#comments</comments>
		<pubDate>Thu, 20 May 2010 08:13:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Actionscript3]]></category>

		<category><![CDATA[Bug]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[js]]></category>

		<category><![CDATA[browser]]></category>

		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.meta-for.net/?p=152</guid>
		<description><![CDATA[Voilà une petite découverte qui m&#8217;a fait chercher un bon ptit moment l&#8217;autre jour. Voici un exemple:

ExternalInterface.addCallback&#40;&#34;callAs&#34;, cb&#41;;
btn.addEventListener&#40; MouseEvent.CLICK , clickHandler &#41;;
&#160;
private function clickHandler&#40; evt : MouseEvent &#41; : void
&#123;
    if&#40; ExternalInterface.available &#41;
    &#123;
        ExternalInterface.call&#40; &#34;callJS&#34; &#41;;
    &#125;
&#125;
&#160;
private function [...]]]></description>
			<content:encoded><![CDATA[<p>Voilà une petite découverte qui m&#8217;a fait chercher un bon ptit moment l&#8217;autre jour. Voici un exemple:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">ExternalInterface.<span style="color: #006600;">addCallback</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;callAs&quot;</span>, cb<span style="color: #66cc66;">&#41;</span>;
btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> MouseEvent.<span style="color: #006600;">CLICK</span> , clickHandler <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> clickHandler<span style="color: #66cc66;">&#40;</span> evt : MouseEvent <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> ExternalInterface.<span style="color: #006600;">available</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;callJS&quot;</span> <span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> cb<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;As called&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=iso-8859-1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
            var flashvars = {};
            var params = {};
            params.wmode = &quot;transparent&quot;;
            params.allowscriptaccess = &quot;always&quot;;
            var attributes = {};
            attributes.id = &quot;flashcontent&quot;;
            attributes.name = &quot;myFlashContent&quot;;
            swfobject.embedSWF(&quot;Main.swf&quot;, &quot;myAlternativeContent&quot;, &quot;800&quot;, &quot;600&quot;, &quot;10.0.0&quot;, false, flashvars, params, attributes);
&nbsp;
            function callJS()
            {
                window.alert(&quot;callJS&quot;);
                flashcontent.callAs();
            }
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;myAlternativeContent&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/go/getflashplayer&quot;</span>&gt;</span>
                <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Get Adobe Flash player&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Vous noterez que j&#8217;appelle le callback sur &#8220;flashcontent&#8221; qui est l&#8217;id du Flash. Et bien sous cette configuration callJS() est bien appelé, mais pas le callback. Mais étonnement tout s&#8217;exécute correctement si je supprime la première ligne du code html, le doctype. J&#8217;ai le même résultat sur Firefox 3.6 et Safari sur Mac. J&#8217;imagine que le fait d&#8217;effacer le doctype désactive le mode strict de rendu html.<br />
La solution consiste, et c&#8217;est la bonne pratique à utiliser de toute manière, à utiliser document de cette manière :</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;">document[&quot;flashcontent&quot;].callAs();</pre></div></div>

<p>Voilou, voilou</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meta-for.net/152/addcallback-et-doctype/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash at the lake report</title>
		<link>http://www.meta-for.net/129/flash-at-the-lake-report/</link>
		<comments>http://www.meta-for.net/129/flash-at-the-lake-report/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 19:20:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Actualités]]></category>

		<category><![CDATA[Conférence]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Non classé]]></category>

		<category><![CDATA[Actionscript3]]></category>

		<category><![CDATA[adobe]]></category>

		<category><![CDATA[Air]]></category>

		<category><![CDATA[alchemy]]></category>

		<category><![CDATA[Experimentation]]></category>

		<category><![CDATA[fdt]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[pixl bender]]></category>

		<category><![CDATA[player]]></category>

		<category><![CDATA[quasimodo]]></category>

		<category><![CDATA[sqlite]]></category>

		<category><![CDATA[suisse]]></category>

		<category><![CDATA[switzerland]]></category>

		<category><![CDATA[tweet]]></category>

		<category><![CDATA[zurich]]></category>

		<guid isPermaLink="false">http://www.meta-for.net/?p=129</guid>
		<description><![CDATA[Et voilà le 1er festival Flash at the lake à Zürich est terminé. Pleins de conférences bien sympas, certaines un peu « déjà-vu » , aussi quelques petits « couacs », mais dans l’ensemble une belle réussite pour une première. Revue sur ces 2 jours qui ont rassemblé pour une fois une bonne partie de [...]]]></description>
			<content:encoded><![CDATA[<p>Et voilà le 1er festival Flash at the lake à Zürich est terminé. Pleins de conférences bien sympas, certaines un peu « déjà-vu » , aussi quelques petits « couacs », mais dans l’ensemble une belle réussite pour une première. Revue sur ces 2 jours qui ont rassemblé pour une fois une bonne partie de la planète Flash suisse. ( dédolé pour la qualité des images, je suis pas encore passé au 3Gs,^^).</p>
<div id="attachment_131" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.meta-for.net/wp-content/uploads/2009/07/zurich.jpg"><img class="size-medium wp-image-131" title="Zürich" src="http://www.meta-for.net/wp-content/uploads/2009/07/zurich-300x185.jpg" alt="Zürich" width="300" height="185" /></a><p class="wp-caption-text">Zürich</p></div>
<p><a title="Aral Balkan" href="http://aralbalkan.com/" target="_blank"><strong>Aral Balkan – Remember the magic</strong></a></p>
<p>Arrivé comme à son habitude avec quelques minutes de retard, votre humble serviteur découvre une salle chantant en cœur le doux nom de « Microsoft » ( si..si..). Après que l’envie de partir en courant fut passée, je vais m’asseoir afin d’écouter Aral Balkan. Alors lui, c’est un sacré numéro… Il nous rappelle tout d’abord aux bons souvenirs des Amigas et autres Comodores avant de décrire l’(énorme) évolution de l’informatique et des outils mis à disposition de nous autres, et d’insister sur le fait que ceux-ci doivent élargir la créativité et que tout ceci doit apporter une plus value à l’expérience utilisateur, le nerf de la guerre…</p>
<div id="attachment_132" class="wp-caption aligncenter" style="width: 235px"><a href="http://www.meta-for.net/wp-content/uploads/2009/07/aral.jpg"><img class="size-medium wp-image-132" title="Aral Balkan" src="http://www.meta-for.net/wp-content/uploads/2009/07/aral-225x300.jpg" alt="Aral Balkan" width="225" height="300" /></a><p class="wp-caption-text">Aral Balkan</p></div>
<p>Et comme il le dit lui-même : «  le design pattern c’est le mal !!! Ne restez pas dans les carcans, EXPERIMENTEZ !!! »</p>
<p><a title="Peter Elst Blog" href="http://www.peterelst.com/blog/" target="_blank"><strong>Petet Eist – Air and Sqlite</strong></a></p>
<p>Une petite conférence sur l’utilisation de base de données embarquées dans une application Air. Démo pratique de son utilisation, code à l’appui et explication des différentes manières de procéder. Sinon je ne m’attarde pas trop sur le sujet mais conseille vivement d’aller matter <a title="Air and Sqlite Slides" href="http://www.peterelst.com/blog/2009/06/26/sqlite-at-the-lake/" target="_blank">les slides de la pres</a> à tous ceux qui seraient intéressés par le sujet.</p>
<p><a title="James Ward's blog" href="http://www.jamesward.com/blog" target="_blank"><strong>James Ward – Pixel Bender</strong></a></p>
<p>On commence par une petite présentation du <a title="Pixel Bender Toolkit on labs" href="http://labs.adobe.com/technologies/pixelbender/" target="_blank">Pixel Bender Toolkit</a>, ce nouvel outil apparu avec la player 10 et qui permet de créer et d’éditer des filtres ensuite exploitables dans le code AS. Les différences entre .pbj et .pbk , ainsi qu’un petit tour par Alchemy.<br />
Il termine ensuite par la présentation de <a title="PbjAS" href="http://www.jamesward.com/blog/2009/04/29/announcing-pbjas-an-actionscript-3-pixel-bender-shader-library/" target="_blank">son incroyable librairie PbjAS,</a> permettant d’utiliser les possibilités de pixel bender et notamment le calcul multi-thread directement au runtime…Rien que ça… Je ne vous donne pas les explications techniques de comment il a réussi ce tour de force, c’était pas très clair pour moi aussi^^</p>
<p><a title="Blog de Paul Burnett" href="http://www.mad.com.au/blog/" target="_blank"><strong>Paul Burnett</strong></a></p>
<p>Platform Evangelist chez Adobe, Paul Burnett vient présenter les nouveautés de la CS4. Il commence par une petite explication de la vision des futurs WorkFlow( Flash CS4, Catalyst, Flash Builder)comme Adobe l’imagine.<br />
On part ensuite sur les nouveautés de Photoshop CS4, streching d’images sans déformations, et de Flash CS4, bones et api 3d notamment… Bref si vous voulez voir l’entier de la conférence regardez la vidéo de la keynote de la dernière Max c’est exactement pareil…</p>
<p><a title="Tiago Dias weblog" href="http://blog.six4rty.ch/" target="_blank"><strong>Marcel Vogt / Tiago Dias – WiiFun/Bend My 3d</strong></a></p>
<p>Et 2 conférences pour le prix d’une !!!&#8230; On commence par une présentation de <a title="Wiiflash" href="http://wiiflash.bytearray.org/" target="_blank">la librairie de Thibault Imbert WiiFlash</a>. Bon rien se spécial de ce côté là, il a présenter les divers devices prix en charge par la librairie, Wiimote, Balance, Nunchuk, etc… Et fait une petite demo d’un jeu qu’il a réalisé prenant en charge le Wheel. Sympa, mais faut dire que le server est pas super stable sur sa machine, il a bien dû s’y reprendre à quelques fois sur chaque demo… Mais faut avouer que c’est toujours sympa de voir les gens s’émerveiller devant le fait qu’il est possible d’utiliser la Wiimote dans Flash, d’ailleurs, je dois avouer que ça m’a donné envie de ressortir la mienne…( euh ma Wiimote biensûr… )</p>
<div id="attachment_133" class="wp-caption aligncenter" style="width: 168px"><a href="http://www.meta-for.net/wp-content/uploads/2009/07/wiiflash.png"><img class="size-medium wp-image-133" title="Marcel Vogt entrain de faire une démo de son jeu" src="http://www.meta-for.net/wp-content/uploads/2009/07/wiiflash-158x300.png" alt="Marcel Vogt entrain de faire une démo de son jeu" width="158" height="300" /></a><p class="wp-caption-text">Marcel Vogt entrain de faire une démo de son jeu</p></div>
<p>En seconde partie Tiago Dias nous a rapidement présenté <a title="AS3dmod" href="http://code.google.com/p/as3dmod/" target="_blank">AS3dMod</a> cette bibliothèque de class permettant d’appliquer des déformations sur des objets 3d avec la majorité des moteurs 3d actuels en Flash.</p>
<p><a title="Rafael Beck" href="http://www.rafaelbeck.com/blog/" target="_blank"><strong>Rafael Beck - Augmented Reality</strong></a></p>
<p>Bon là comme je m’y attendais grandement, une bonne partie de déjà-vu sur les démos de <a title="FlarToolkit" href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en" target="_blank">FlarToolkit</a> qu’il a présentées. Par contre, je dois avouer que je ne connaissais pas du tout <a title="FlarManager" href="http://transmote.com/flar/FLARManager_v01.zip">le framework FLARManager</a> et je vais m’empresser de le tester car ça à l’air vraiment bien foutu.</p>
<div id="attachment_135" class="wp-caption aligncenter" style="width: 286px"><a href="http://www.meta-for.net/wp-content/uploads/2009/07/augmented_reality.jpg"><img class="size-medium wp-image-135" title="Rafel Beck" src="http://www.meta-for.net/wp-content/uploads/2009/07/augmented_reality-276x300.jpg" alt="Rafel Beck" width="276" height="300" /></a><p class="wp-caption-text">Rafel Beck</p></div>
<p>Un petit détour ensuite sur <a title="Marilena Library" href="http://www.libspark.org/wiki/mash/Marilena" target="_blank">Marilena</a> une petite bibliothèque de détection de mouvements.<br />
Sinon, il a aussi présenté d’autres projets qui sortent du cadre du Flash notamment un en provenance directe du MIT, et faut bien dire que ça en jette… Minority Report vous avez dit ?</p>
<p><a title="Augmented reality slides" href="http://www.rafaelbeck.com/blog/wp-content/uploads/2009/07/FATL-Pr%C3%A4sentation.pdf">Les slides de la présentation</a></p>
<p><a title="Michel Plank" href="http://www.michaelplank.com/" target="_blank"><strong>Michael Plank - Simultaneous Web and Desktop Development</strong></a></p>
<p>Super conférence avec un des gars de <a title="fdt" href="http://fdt.powerflasher.com/" target="_blank">FDT</a> qui nous donne en gros ses best practices pour le développement d’applications destinées autant pour le Web que pour le bureau. Ça commence par une bonne petite explication des différences à appréhender entre les 2 plateformes, notamment entre le playerglobal.swc et le airglobal.swc.<br />
Il explique ensuite les différentes manières de procéder et notamment une qui retient mon attention, la compilation conditionnelle. Je vous en dis pas plus pour l’instant car je prépare un post la dessus pour l’expliquer plus en détail.<br />
Et on finit sur un petite explication de la compilation groupée avec Ant, chose qui m’a bien servie.</p>
<p><a title="Serge Jespers blog" href="http://www.webkitchen.be/" target="_blank"><strong>Serge Jespers – RIA’s with Flash Catalyst</strong></a></p>
<p>Petite de démo de <a title="Flash Catalyst on the labs" href="http://labs.adobe.com/technologies/flashcatalyst/" target="_blank">Catalyst</a> avec Serge Jespers. En fait, la création du widget qu’Adobe utilise en interne pour faire des recherches sur les employés. Faut dire que chaque fois que je vois une démonstration de Catalyst je vois ce même tuto, j’espère qu’on peut faire autre chose avec ☺. Vous pouvez donc revoir tout ça en allant regarder <a title="Tuto catalyst" href="http://www.bytearray.org/?p=839" target="_blank">cette vidéo de Thibaut Imbert</a>, c’était la même chose.</p>
<p><a title="UnitZeroOne" href="http://www.unitzeroone.com/blog/" target="_blank"><strong>Ralph Hauwert – Pushing Pixels in Flash 10</strong></a></p>
<p>Excellente conférence, sans doute une des meilleurs à mon goût de Ralph Hauwert ( unitZeroOne ) sur la manipulation de pixels et les nouveautés apportées par le player 10 dans ce domaine.<br />
Particulièrement porté sur l’expérimentation également au niveau musicale qui est une de ses passions, il commence en présentant son émulateur de sons c64. Grand moment à la diffusion du thème de AirWulf…<br />
On poursuit ensuite par une démo très impressionnante sur la façon de simuler de la 3d, sans librairie telle que pv3d ni même les nouvelles fonctionnalités de Flash 10. Tout ceci en utilisant des superpositions de textures et des déformations de bitmap… very cool.<br />
Quelques best practices sur Alchemy ensuite et je ne saurais que trop vous conseiller son blog à ce sujet.<br />
Et pour terminer une petite démo de PapervisionX, la prochaine mouture du moteur de rendu 3d pour le nouveau player dont Ralph fait parti de l’équipe de développement. Et que dire d’autre à part que je suis très impatient de pouvoir utiliser tout ça. L’adaptation du célèbre jeu Quake montre le formidable potentiel de cette version en terme de performances et de qualité des shaders… Si vous voulez en savoir plus, vous pouvez toujours allez lire <a title="Papervision X" href="http://blog.papervision3d.org/2009/03/16/papervisionx-what-it-is-and-what-it-isnt/" target="_blank">cet article</a>.</p>
<p><a title="Quasimodo's blog" href="http://www.quasimondo.com/" target="_blank"><strong>The Thinker’s box – Mario Klingemann</strong></a></p>
<p>Et pour finir en beauté Quasimodo nous gratifie d’une « pres » totalement orientée expérimentation. Ça passe par la génération de dessin , les voxels, la géométrie, la couleurs…de l’art numérique.<br />
Et on termine par une description par étapes de la réalisation de <a title="Mona Lisa" href="http://www.flickr.com/photos/quasimondo/3518306770/" target="_blank">son Tweet de la Mona Lisa</a> encodé en base64… Bref du grand art, et même si je n’ai pas tout compris, la passion avec laquelle il raconte tout ça est tout bonnement génial.</p>
<p>Bref, voilà un week-end fort sympathique et pour une fois qu’il y a quelque chose en Suisse, j’ai qu’une chose à dire : « Bravo à tous les organisateurs et à tous les speakers… See you next year !!! »</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meta-for.net/129/flash-at-the-lake-report/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AS3Facebooklib et problématique du typage des nombres</title>
		<link>http://www.meta-for.net/55/as3facebooklib-et-problematique-du-typage-des-nombres/</link>
		<comments>http://www.meta-for.net/55/as3facebooklib-et-problematique-du-typage-des-nombres/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 18:40:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Actionscript3]]></category>

		<category><![CDATA[Air]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[facebook]]></category>

		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.meta-for.net/?p=55</guid>
		<description><![CDATA[Ayant depuis quelques temps décidé de toucher un peu au développement d&#8217;application pour Facebook, j&#8217;ai opté pour le webapi de Abode disponible à cette adresse afin de l&#8217;utiliser dans une RDA Air.
L&#8217;API est plutôt bien fichu avec des méthodes et propriétés dont la syntaxe respecte au mieux ce qui est décrit dans le wiki officiel [...]]]></description>
			<content:encoded><![CDATA[<p>Ayant depuis quelques temps décidé de toucher un peu au développement d&#8217;application pour Facebook, j&#8217;ai opté pour le webapi de Abode disponible <a href="http://code.google.com/p/as3facebooklib/downloads/list">à cette adresse</a> afin de l&#8217;utiliser dans une RDA Air.</p>
<p>L&#8217;API est plutôt bien fichu avec des méthodes et propriétés dont la syntaxe respecte au mieux ce qui est décrit dans <a href="http://wiki.developers.facebook.com/index.php/Main_Page">le wiki officiel</a> pour l&#8217;API Rest de Facebook, ce qui permet de se calquer très facilement dessus.</p>
<p>Du coup, je me lance et je teste un peu toutes les méthodes qui m&#8217;intéressent. Tout fonctionne à merveille jusqu&#8217;au moment où je désire récupérer les photos d&#8217;un album précis. Explication:<span id="more-55"></span></p>
<p>Tout d&#8217;abord je récupère les albums avec la méthode &#8220;photos.getAlbum()&#8221;. Je place la réponse dans un Array et tout est ok, je reçois bien des objets [Album] et leur nombre est exacte. Du coup j&#8217;en choisi un au hasard et je récupère son id (&#8221;aid&#8221;) qui me renvoie quelque chose comme &#8220;20074892&#8243;. Je me dis cool, pas de problème, je vais employer cet id comme argument de la méthode &#8220;photos.get()&#8221; pour récupérer les infos de chaque photo de cette album. Et là rien, pas moyen de les récupérer. Je cherche partout dans mon code et après plusieurs heures, je me rend compte que chaque album me renvoie le même id, hum&#8230; bizarre.</p>
<p>Et comme je ne remets toujours pas en cause une API développée par Adobe, je continue à chercher l&#8217;erreur dans mon code. Quand je pense enfin à tester mon code avec la console du site developper de facebook, je me rends compte que le xml renvoyé donne un id différent pour l&#8217;album, du style: 3047494766431392632. Et la bingo, je comprend le problème, AS3Facebooklib type les id notamment ceux pour les albums en &#8220;int&#8221;. Le type &#8220;int&#8221; étant 32 bit son maximum est de 2147483648. Du coup le typage en &#8220;int&#8221; modifiait mon id qui n&#8217;était plus correct. Du coup je me dis, je vais le passer en Number et plop tjr pas&#8230; Voici une petite explication:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> aidInt:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">3047494766431392632</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> aidNum:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">3047494766431392632</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> aidString:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;3047494766431392632&quot;</span>;
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;aidInt : &quot;</span>+aidInt<span style="color: #66cc66;">&#41;</span>;               <span style="color: #808080; font-style: italic;">//renvoi 87040</span>
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;aidNum : &quot;</span>+aidNum<span style="color: #66cc66;">&#41;</span>;          <span style="color: #808080; font-style: italic;">//renvoi 3047494766431393000</span>
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;aidString : &quot;</span>+aidString<span style="color: #66cc66;">&#41;</span>;      <span style="color: #808080; font-style: italic;">//renvoi 3047494766431392632</span></pre></div></div>

<p>Du coup, le seul moyen que j&#8217;ai trouvé est de modifier le code pour que l&#8217;id d&#8217;album soit typé en String partout dans le code, qui est en fin de compte le format dans lequel doit le recevoir Facebook, mais qui n&#8217;est  pas pratique à l&#8217;utilisation dans le code.</p>
<p>Bref, 2 choses a retenir la dedans:</p>
<ol>
<li>Ne pas se fier complètement à ce genre d&#8217;API, même si ça vient d&#8217;Adobe&#8230;</li>
<li>Ne devrait-on pas avoir un type capable de gérer un nombre avec autant de décimal, car j&#8217;imagine que le problème doit pouvoir se reproduire dans d&#8217;autres projets?</li>
</ol>
<p>Voilou, si j&#8217;ai le temps, je posterai un petit tuto pour expliquer la façon de commencer une appli Air Facebook, notamment au niveau de l&#8217;authenification.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meta-for.net/55/as3facebooklib-et-problematique-du-typage-des-nombres/feed/</wfw:commentRss>
		</item>
		<item>
		<title>APE Physical Engine&#8230; Boinnnngggg!!!</title>
		<link>http://www.meta-for.net/26/ape-physical-engine-boinnnngggg/</link>
		<comments>http://www.meta-for.net/26/ape-physical-engine-boinnnngggg/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 10:53:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Actionscript3]]></category>

		<category><![CDATA[Experimentation]]></category>

		<category><![CDATA[ape]]></category>

		<category><![CDATA[engine]]></category>

		<category><![CDATA[experiment]]></category>

		<category><![CDATA[physic]]></category>

		<guid isPermaLink="false">http://www.meta-for.net/?p=26</guid>
		<description><![CDATA[Collision, gravité, force: sur le papier APE Engine est franchement alléchant. Malheureusement, Alec Cove qui a développé cette bibliothèque de classes a apparemment stopper son développement, le site web n&#8217;ayant plus été mis à jour depuis plus d&#8217;une année et demi. Il y aurait encore certaines personnes qui mettent à jour le repository, mais j&#8217;avoue [...]]]></description>
			<content:encoded><![CDATA[<p>Collision, gravité, force: sur le papier APE Engine est franchement alléchant. Malheureusement, Alec Cove qui a développé cette bibliothèque de classes a apparemment stopper son développement, le <a title="APE Engine" href="http://www.cove.org/ape/" target="_blank">site web</a> n&#8217;ayant plus été mis à jour depuis plus d&#8217;une année et demi. Il y aurait encore certaines personnes qui mettent à jour le repository, mais j&#8217;avoue qu&#8217;à ce niveau là c&#8217;est un peu le bordel. La dernière release dans le trunk n&#8217;a pas toutes les classes, ils faut aller les chercher dans branches et surtout prendre les versions qui va correspondre à la doc que vous avez. Bref une fois les bonnes classes installées, (j&#8217;exagère c&#8217;est pas si long, ne partez pas&#8230;), on peut voir un peu ce qu&#8217;il a dans le ventre.<span id="more-26"></span></p>
<p>J&#8217;ai donc rapidement réalisé une anim pour voir un peu les éléments qui m&#8217;intéressait.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="420" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/wp-content/uploads/2008/12/basketphysics.swf" /><embed type="application/x-shockwave-flash" width="550" height="420" src="/wp-content/uploads/2008/12/basketphysics.swf"></embed></object></p>
<p>Voici une partie du code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> BasketPhysics<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	displayText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
&nbsp;
	addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, run<span style="color: #66cc66;">&#41;</span>; 
&nbsp;
       APEngine.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
       APEngine.<span style="color: #006600;">container</span> = <span style="color: #0066CC;">this</span>;
       APEngine.<span style="color: #006600;">addMasslessForce</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Vector<span style="color: #66cc66;">&#40;</span>0,<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
       <span style="color: #000000; font-weight: bold;">var</span> defaultGroup:Group = <span style="color: #000000; font-weight: bold;">new</span> Group<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">collideInternal</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
       basketBall = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
       basketBall.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xB5430B<span style="color: #66cc66;">&#41;</span>;
       basketBall.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawCircle</span><span style="color: #66cc66;">&#40;</span>0, 0, <span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
       myBall = <span style="color: #000000; font-weight: bold;">new</span> BasketBallon<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
       <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;myBall : &quot;</span> + myBall<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> bridgeParticleLeft:RectangleParticle = <span style="color: #000000; font-weight: bold;">new</span> RectangleParticle<span style="color: #66cc66;">&#40;</span>0, 0, <span style="color: #cc66cc;">80</span>, <span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
       basketBallParticle = <span style="color: #000000; font-weight: bold;">new</span> WheelParticle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">500</span>, <span style="color: #cc66cc;">380</span>, <span style="color: #cc66cc;">30</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
       basketBallParticle.<span style="color: #006600;">setDisplay</span><span style="color: #66cc66;">&#40;</span>myBall, -<span style="color: #cc66cc;">30</span>, -<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addParticle</span><span style="color: #66cc66;">&#40;</span>basketBallParticle<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> panierGA:RectangleParticle = <span style="color: #000000; font-weight: bold;">new</span> RectangleParticle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">50</span>, <span style="color: #cc66cc;">130</span>, <span style="color: #cc66cc;">90</span>, <span style="color: #cc66cc;">20</span>, <span style="color: #cc66cc;">45</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addParticle</span><span style="color: #66cc66;">&#40;</span>panierGA<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> panierDR:RectangleParticle = <span style="color: #000000; font-weight: bold;">new</span> RectangleParticle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">180</span>, <span style="color: #cc66cc;">130</span>, <span style="color: #cc66cc;">90</span>, <span style="color: #cc66cc;">20</span>, -<span style="color: #cc66cc;">45</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addParticle</span><span style="color: #66cc66;">&#40;</span>panierDR<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> anchor1:CircleParticle = <span style="color: #000000; font-weight: bold;">new</span> CircleParticle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">30</span>, <span style="color: #cc66cc;">400</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
       defaultGroup.<span style="color: #006600;">addParticle</span><span style="color: #66cc66;">&#40;</span>anchor1<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> anchor2:CircleParticle = <span style="color: #000000; font-weight: bold;">new</span> CircleParticle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">240</span>, <span style="color: #cc66cc;">400</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addParticle</span><span style="color: #66cc66;">&#40;</span>anchor2<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> joint:CircleParticle = <span style="color: #000000; font-weight: bold;">new</span> CircleParticle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">135</span>, <span style="color: #cc66cc;">400</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1.2</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addParticle</span><span style="color: #66cc66;">&#40;</span>joint<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> constarintLeft:SpringConstraint = <span style="color: #000000; font-weight: bold;">new</span> SpringConstraint<span style="color: #66cc66;">&#40;</span>anchor1, joint,<span style="color: #cc66cc;">0.5</span>, <span style="color: #000000; font-weight: bold;">true</span>,  <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">0.8</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
       constarintLeft.<span style="color: #006600;">alwaysRepaint</span> = <span style="color: #000000; font-weight: bold;">true</span>;
       constarintLeft.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, 0xFF0000, <span style="color: #cc66cc;">1</span>, 0x000000, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
       constarintLeft.<span style="color: #006600;">fixedEndLimit</span> = <span style="color: #cc66cc;">0.25</span>; 
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> constarintRight:SpringConstraint = <span style="color: #000000; font-weight: bold;">new</span> SpringConstraint<span style="color: #66cc66;">&#40;</span>anchor2, joint,<span style="color: #cc66cc;">0.5</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">0.8</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
       constarintRight.<span style="color: #006600;">alwaysRepaint</span> = <span style="color: #000000; font-weight: bold;">true</span>;
       defaultGroup.<span style="color: #006600;">addConstraint</span><span style="color: #66cc66;">&#40;</span>constarintLeft<span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addConstraint</span><span style="color: #66cc66;">&#40;</span>constarintRight<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #000000; font-weight: bold;">var</span> boundaryBox:Boundary = <span style="color: #000000; font-weight: bold;">new</span> Boundary<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
       defaultGroup.<span style="color: #006600;">addCollidable</span><span style="color: #66cc66;">&#40;</span>boundaryBox<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       APEngine.<span style="color: #006600;">addGroup</span><span style="color: #66cc66;">&#40;</span>boundaryBox<span style="color: #66cc66;">&#41;</span>;
       APEngine.<span style="color: #006600;">addGroup</span><span style="color: #66cc66;">&#40;</span>defaultGroup<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_DOWN</span>, ballDownHandler<span style="color: #66cc66;">&#41;</span>;
       <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_UP</span>, ballUpHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
       <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>KeyboardEvent.<span style="color: #006600;">KEY_DOWN</span>, keyDown<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> shootBall<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     removeChild<span style="color: #66cc66;">&#40;</span>vectorForceDisplay<span style="color: #66cc66;">&#41;</span>;
     basketBallParticle.<span style="color: #006600;">fixedPosition</span> = <span style="color: #000000; font-weight: bold;">false</span>;
     basketBallParticle.<span style="color: #006600;">velocity</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Vector<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>beginPointX-mouseX<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">5</span>, <span style="color: #66cc66;">&#40;</span>beginPointY-mouseY<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Quelques points intéressants:</p>
<p>- On crée des groupes de particles (cercle, rectangle, roue) qui peuvent se collisioner entre elles ou entre groupes.</p>
<p>- La methode setDisplay qui permet de remplacer une particle par n&#8217;importe quel DisplayObject( voir le ballon en dessus, c&#8217;est un wheel à la base).</p>
<p>- Le springConstraint qui permet de faire une sorte de lien entre 2 particles.</p>
<p>Sinon un des gros point noir comme vous pouvez le juger sur l&#8217;anim, c&#8217;est la gestion des collisions surtout avec des particles trop rapides, j&#8217;imagine que le rafraichissement est pas assez rapide(c&#8217;est enterFrame qui tourne pour gérer tout ça), et que la particle ne touche à aucun moment l&#8217;autre. On pourrait sans doute augmenter le frame rate(à 30 ici), mais ce bien sûr au détriment des performance, et si on l&#8217;intègre dans un projet conséquent, comme composant d&#8217;un jeu par exemple, cela pourrait s&#8217;avérer problématique.</p>
<p>Je vais tester encore un peu tout ça, et je vous en redonne des news dans un prochain article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meta-for.net/26/ape-physical-engine-boinnnngggg/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Créer un appli Air dans Flex Builder 3</title>
		<link>http://www.meta-for.net/21/creer-un-appli-air-dans-flex-builder-3/</link>
		<comments>http://www.meta-for.net/21/creer-un-appli-air-dans-flex-builder-3/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 17:34:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Actionscript3]]></category>

		<category><![CDATA[Flex Builder]]></category>

		<category><![CDATA[Air]]></category>

		<category><![CDATA[export]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://localhost:8888/wordpress/?p=21</guid>
		<description><![CDATA[Depuis le début de mon nouveau stage, je me suis mis à Flex pour mes projets AS3. Et il est vrai qu&#8217;il est bien difficile de revenir à Flash IDE quand il n&#8217;y a pas d&#8217;autres alternatives, tant le confort d&#8217;utilisation y est augmenté.
Cependant, l&#8217;autre  jour je suis tombé sur un os: comment créer [...]]]></description>
			<content:encoded><![CDATA[<p>Depuis le début de mon nouveau stage, je me suis mis à Flex pour mes projets AS3. Et il est vrai qu&#8217;il est bien difficile de revenir à Flash IDE quand il n&#8217;y a pas d&#8217;autres alternatives, tant le confort d&#8217;utilisation y est augmenté.</p>
<p>Cependant, l&#8217;autre  jour je suis tombé sur un os: comment créer un projet Air AS3 et publier le fichier .air certifié ?</p>
<p>Et bien en fait, c&#8217;est très simple:<span id="more-21"></span></p>
<ol>
<li>Faites File &gt; New &gt; New FlexProject</li>
<li>Donner un nom à votre Projet, mais surtout dans &#8220;Application Type&#8221; choisissez &#8220;DesktopApplication&#8221;.</li>
<li>A la dernière étape du Wizard, renommez le &#8220;Main application file&#8221; en &#8220;.as&#8221;</li>
</ol>
<p>Et voilà votre projet est prêt. Une fois que celui-ci sera terminé:</p>
<ol>
<li> sélectionnez votre projet dans l&#8217;inspecteur</li>
<li>Faites File &gt; Export &gt; Release Build&#8230;</li>
<li>Vérifiez que c&#8217;est bien le projet désiré qui est sélectionné puis suivez les étapes du Wizard, c&#8217;est sensiblement le même principe que dans Flash IDE</li>
</ol>
<p>Voilou, j&#8217;espère que ça pourra servir à quelqu&#8217;un&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meta-for.net/21/creer-un-appli-air-dans-flex-builder-3/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
