<?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>Cyril Pereira</title>
	<atom:link href="http://www.cyrilpereira.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyrilpereira.com</link>
	<description>Software Developer for Web, Mobile &#38; Interactive Media</description>
	<lastBuildDate>Mon, 29 Apr 2013 12:50:24 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Pinchzoom avec iscroll4 and jquery mobile</title>
		<link>http://www.cyrilpereira.com/2013/04/16/pinchzoom-avec-iscroll4-and-jquery-mobile/</link>
		<comments>http://www.cyrilpereira.com/2013/04/16/pinchzoom-avec-iscroll4-and-jquery-mobile/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 13:08:53 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iscroll]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquerymobile]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=982</guid>
		<description><![CDATA[Pour cela il vous faut : iscroll4 jQuery Mobile Attention ceci ne va marche que dans l&#8217;emulateur ios ou sur un mobile iphone ou ipad. Pour faire un pinchzoom avec iscroll4 dans jqm il faut ajouter un div suplémentaire dans&#8230;]]></description>
			<content:encoded><![CDATA[<p>Pour cela il vous faut :</p>
<p><a href="http://cubiq.org/iscroll-4" target="_blank">iscroll4</a></p>
<p><a href="http://jquerymobile.com/" target="_blank">jQuery Mobile</a></p>
<p>Attention ceci ne va marche que dans l&#8217;emulateur ios ou sur un mobile iphone ou ipad.</p>
<p>Pour faire un pinchzoom avec iscroll4 dans jqm il faut ajouter un div suplémentaire dans le content comme ceci avec l&#8217;id view.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
</pre>
</td>
<td class="code">
<pre class="html5" style="font-family:monospace;"><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;pdf&quot;</span> data-role<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> data-tap-toggle<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;false&quot;</span> data-role<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span> data-theme<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;d&quot;</span> data-position<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fixed&quot;</span>&gt;</span>                                    
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</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: #000000; font-weight: bold;">div</span> data-role<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;view&quot;</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;scroller&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;yourpicture.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&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;">div</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;">div</span>&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>Ensuite ajouter ceci à vos CSS.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre>
</td>
<td class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#view</span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>    
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#scroller</span>
<span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    -webkit-tap-highlight-color<span style="color: #00AA00;">:</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>Pour activer le pinchzoom avec iscroll.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> pinchZoom <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">new</span> iScroll<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'view'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
  zoom<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
  hScrollbar<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
  vScrollbar<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Pensez à vider la mémoire des pinchzoom non utilisé comme ceci, car ça consomme beaucoup.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>pinchZoom<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  pinchZoom.<span style="color: #660066;">destroy</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinchZoom <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2013/04/16/pinchzoom-avec-iscroll4-and-jquery-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phonegap afficher la base de donnée</title>
		<link>http://www.cyrilpereira.com/2013/04/16/phonegap-afficher-la-base-de-donnee/</link>
		<comments>http://www.cyrilpereira.com/2013/04/16/phonegap-afficher-la-base-de-donnee/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 04:31:36 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[ios]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=966</guid>
		<description><![CDATA[Dans le cas ou vous avez besoin de regarder ce que vous faites dans la base de donnée votre application je vous conseil d&#8217;utiliser SQLITE browser. Ce logiciel va vous permettre d&#8217;ouvrir les .db, d&#8217;afficher et d&#8217;effectuer des tests de&#8230;]]></description>
			<content:encoded><![CDATA[<p>Dans le cas ou vous avez besoin de regarder ce que vous faites dans la base de donnée votre application je vous conseil d&#8217;utiliser <strong>SQLITE browser</strong>. Ce logiciel va vous permettre d&#8217;ouvrir les .db, d&#8217;afficher et d&#8217;effectuer des tests de requêtes</p>
<p><a href="http://www.cyrilpereira.com/wp-content/uploads/2013/04/sqlite-browser.png"><img class="alignnone size-full wp-image-967" title="sqlite-browser" src="http://www.cyrilpereira.com/wp-content/uploads/2013/04/sqlite-browser.png" alt="" width="701" height="508" /></a></p>
<p>A télécharger ici <a href="http://sqlitebrowser.sourceforge.net/" target="_blank">http://sqlitebrowser.sourceforge.net/</a></p>
<p>Vous trouverez la base de donnée de votre application dans ce repetoire</p>
<div class="wp_syntax">
<table>
<tr>
<td class="code">
<pre class="text" style="font-family:monospace;">/Users/YOUR_NAME/Library/Application\ Support/iPhone\ Simulator/6.1/Applications/ID_IOS_APP/Library/WebKit/LocalStorage/file__0/0000000000000001.db</pre>
</td>
</tr>
</table>
</div>
<p>Ouvrez ce fichier avec SQLITE Browser pour afficher son contenu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2013/04/16/phonegap-afficher-la-base-de-donnee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TemplatesJS &#8211; jQuery Plugin</title>
		<link>http://www.cyrilpereira.com/2013/04/15/templatesjs-jquery-plugin/</link>
		<comments>http://www.cyrilpereira.com/2013/04/15/templatesjs-jquery-plugin/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 17:58:29 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryplugin]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=964</guid>
		<description><![CDATA[J&#8217;ai terminé un nouveau plugin jQuery disponible gratuitement sur github. C&#8217;est un super simple et super légé template-engine. Comment ça marche ? Tout d&#8217;abord, ajouter à votre page html un template comme ceci, n&#8217;oubliez pas d&#8217;ajouter la class tpl ,&#8230;]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai terminé un nouveau plugin jQuery disponible gratuitement sur github.</p>
<p>C&#8217;est un super simple et super légé template-engine.</p>
<p>Comment ça marche ?</p>
<p>Tout d&#8217;abord, ajouter à votre page html un template comme ceci, n&#8217;oubliez pas d&#8217;ajouter la class <strong>tpl</strong> , elle est utilisée pour identifier les templates dans la page.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
</pre>
</td>
<td class="code">
<pre class="html5" style="font-family:monospace;"><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/template&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tpl&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tplTest&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;box&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Nickname<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> : {nickname}<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Age<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> : {age}<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</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;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>Pour démarrer le moteur, voici ce qu&#8217;il faut faire</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;">template.<span style="color: #660066;">initialize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Pour récupérer un template.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> _tpl <span style="color: #339933;">=</span> template.<span style="color: #660066;">getTemplate</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tplTest'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>avec un objet JSON c&#8217;est facile d&#8217;injecter du contenu.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> obj <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
  <span style="color: #009900;">&#123;</span>nickname<span style="color: #339933;">:</span><span style="color: #3366CC;">'discoboyz'</span><span style="color: #339933;">,</span>age<span style="color: #339933;">:</span><span style="color: #CC0000;">22</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#123;</span>nickname<span style="color: #339933;">:</span><span style="color: #3366CC;">'mariloo'</span><span style="color: #339933;">,</span>age<span style="color: #339933;">:</span><span style="color: #CC0000;">25</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#123;</span>nickname<span style="color: #339933;">:</span><span style="color: #3366CC;">'funkybrother'</span><span style="color: #339933;">,</span>age<span style="color: #339933;">:</span><span style="color: #CC0000;">35</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
$<span style="color: #009900;">&#40;</span>obj<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">var</span> _h <span style="color: #339933;">=</span> template.<span style="color: #660066;">format</span><span style="color: #009900;">&#40;</span>_tpl<span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>_h<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p><a href="https://github.com/funkymed/templatejs" target="_blank">Télécharger depuis github</a></p>
<p><a href="http://cyrilpereira.com/templatejs/" target="_blank">Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2013/04/15/templatesjs-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phonegap and assets</title>
		<link>http://www.cyrilpereira.com/2013/04/15/phonegap-and-assets/</link>
		<comments>http://www.cyrilpereira.com/2013/04/15/phonegap-and-assets/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 17:40:29 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[ios]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[assets]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=955</guid>
		<description><![CDATA[Juste avant de finaliser une app ios j&#8217;ai eu un gros probleme. Je devais pouvoir mettre a jour des fichiers locaux ou assets dans l&#8217;application. Le problème c&#8217;est que j&#8217;ai découvert qu&#8217;il n&#8217;était pas autorisé de le faire dans le&#8230;]]></description>
			<content:encoded><![CDATA[<p>Juste avant de finaliser une app ios j&#8217;ai eu un gros probleme.</p>
<p>Je devais pouvoir mettre a jour des fichiers locaux ou assets dans l&#8217;application. Le problème c&#8217;est que j&#8217;ai découvert qu&#8217;il n&#8217;était pas autorisé de le faire dans le répertoire <strong>www</strong> de phonegap.</p>
<p>Par contre il y a 2 répertoires <strong>Documents</strong> et <strong>tmp</strong> qui le sont.</p>
<p>Du coup un autre problème arrive, celui de pouvoir accéder depuis l&#8217;application (<strong>www</strong>) au fichier <strong>Documents</strong> ou <strong>tmp</strong> qui sont placé au même niveau que <strong>www</strong>.</p>
<p>Pour commencer voici de quoi récupérer tout les <strong>path</strong>.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> mediapath<span style="color: #339933;">,</span>  <span style="color: #006600; font-style: italic;">// the app documents path </span>
    tmppath<span style="color: #339933;">,</span>    <span style="color: #006600; font-style: italic;">// the app tmp path</span>
    imagepath<span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">// the medias file path</span>
&nbsp;
window.<span style="color: #660066;">requestFileSystem</span><span style="color: #009900;">&#40;</span>LocalFileSystem.<span style="color: #660066;">PERSISTENT</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
  <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>fileSystem<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">var</span> entry<span style="color: #339933;">=</span>fileSystem.<span style="color: #660066;">root</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">var</span> p <span style="color: #339933;">=</span> entry.<span style="color: #660066;">fullPath</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Documents'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    mediapath <span style="color: #339933;">=</span> entry.<span style="color: #660066;">fullPath</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'/'</span><span style="color: #339933;">;</span> 
    tmppath <span style="color: #339933;">=</span> p<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'tmp/'</span><span style="color: #339933;">;</span>  
    imagepath <span style="color: #339933;">=</span> <span style="color: #3366CC;">'file://'</span><span style="color: #339933;">+</span>mediapath<span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">null</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Les path <strong>mediapath</strong> et <code>tmppath</code> seront utilisé pour telecharger ou  dezipper des fichiers sans aucun problème.</p>
<p>Pensez toutefois à donner un nom de fichier à vos target dans le téléchargement et l&#8217;unzip au risque d&#8217;avoir une erreur (code 2).</p>
<p>Tout vos fichiers placés dans le répertoire <strong>Documents</strong> seront accessible par <strong>imagepath</strong> mais cela fonctionnera uniquement dans le simulateur ios ou sur ipad/iphone.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> mypic <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;img src=&quot;'</span><span style="color: #339933;">+</span>imagepath<span style="color: #339933;">+</span><span style="color: #3366CC;">'myfile.jpg&quot; alt=&quot;&quot; /&gt;'</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2013/04/15/phonegap-and-assets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebservicesJS &#8211; jQuery Plugin</title>
		<link>http://www.cyrilpereira.com/2013/03/15/webservicesjs-jquery-plugin/</link>
		<comments>http://www.cyrilpereira.com/2013/03/15/webservicesjs-jquery-plugin/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 09:06:02 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryplugin]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=952</guid>
		<description><![CDATA[Je viens de terminer un nouveau plugin pour jquery afin de tester facilement et rapidement des webservices. plus d&#8217;info ici : http://www.cyrilpereira.com/webservicesjs/ GitHub :]]></description>
			<content:encoded><![CDATA[<p>Je viens de terminer un nouveau plugin pour jquery afin de tester facilement et rapidement des webservices.</p>
<p>plus d&#8217;info ici : <a href="http://www.cyrilpereira.com/webservicesjs/" title="http://www.cyrilpereira.com/webservicesjs/" target="_blank">http://www.cyrilpereira.com/webservicesjs/</a></p>
<p>GitHub : <a href="https://github.com/funkymed/webservicesjs" title="https://github.com/funkymed/webservicesjs" target="_blank"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2013/03/15/webservicesjs-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Away3D AS3 &#8211; tutorial rapide</title>
		<link>http://www.cyrilpereira.com/2012/08/20/away3d-tutorial-1/</link>
		<comments>http://www.cyrilpereira.com/2012/08/20/away3d-tutorial-1/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 08:27:24 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[away3D]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flashdevelop]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=468</guid>
		<description><![CDATA[Petit test d&#8217;animation et de manipulation de camera avec Away3D]]></description>
			<content:encoded><![CDATA[<p>Petit test d&#8217;animation et de manipulation de camera avec Away3D</p>
<p><span id="more-468"></span></p>
<p>		<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="620" height="460 id="main" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="menu" value="false" /><param name="movie" value="/upload/flash/away3d/torus/Away3D.swf" /><param name="quality" value="high" /><embed src="/upload/flash/away3d/torus/Away3D.swf" quality="high" width="620" height="460" name="main"  menu="false" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
		</object></p>
<p>    <a href="http://www.cyrilpereira.com/upload/flash/away3d/torus/" target="_blank">Ouvrir dans une nouvelle fenetre</a></p>
<p>Voici les class à importer pour initialiser le projet, HoverCamera3D pour manipuler la camera, View3D pour le viewport, ColorMaterial pour appliquer le material sur les meshes, Torus pour le mesh du torus, Trident pour le mesh du trident affichant le sens de la scene 3D, DirectionalLight3D pour la lumiére, ShadingColorMaterial pour la type de rendu.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>cameras<span style="color: #000066; font-weight: bold;">.</span>HoverCamera3D<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>containers<span style="color: #000066; font-weight: bold;">.</span>View3D<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>materials<span style="color: #000066; font-weight: bold;">.</span>ColorMaterial<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>primitives<span style="color: #000066; font-weight: bold;">.</span>Torus<span style="color: #000066; font-weight: bold;">;</span> 
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>primitives<span style="color: #000066; font-weight: bold;">.</span>Trident<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">render</span><span style="color: #000066; font-weight: bold;">.</span>Renderer<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>lights<span style="color: #000066; font-weight: bold;">.</span>DirectionalLight3D<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> away3d<span style="color: #000066; font-weight: bold;">.</span>materials<span style="color: #000066; font-weight: bold;">.</span>ShadingColorMaterial<span style="color: #000066; font-weight: bold;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Ensuite voici la liste des class de base a importer. Vectore3D pour definir des positions avec les coordonnées XYZ, Sprite pour flashdevelop, StageAlin et StageScaleMode pour le liquid layout, Event et MouseEvent pour recuperer la souris pour la camera.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>11
12
13
14
15
16
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span>Vector3D<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">StageAlign</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">StageScaleMode</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Je ne vais pas vous lister l&#8217;integralité du source, mais en gros mon experience consistait à initialiser une vie,  manipuler une camera a la souris, afficher des meshes et les animer.</p>
<p>L&#8217;affichage final se fait ainsi</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>131
132
133
134
135
136
137
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>	
  updateStage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
  hoverCam<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
  updateAnimation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
  view<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">render</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>updateStage met à jour la vue flash en liquid layout. Pour cela il faut ajouter ces 2 lignes dans le main.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>38
39
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleMode</span> = <span style="color: #004993;">StageScaleMode</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NO_SCALE</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = <span style="color: #004993;">StageAlign</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TOP_LEFT</span><span style="color: #000066; font-weight: bold;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Ensuite la methode updateStage met à jour la vue à chaque cycle.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>104
105
106
107
108
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> updateStage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  view<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
  view<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>La methode hoverCam va nous permettre de recuperer l&#8217;evenement de la souris pour manipuler la camera.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>110
111
112
113
114
115
116
117
118
119
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> hoverCam<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  <span style="color: #6699cc; font-weight: bold;">var</span> cameraSpeed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0.3</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// Approximately same speed as mouse movement.</span>
  <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>move<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
      camera<span style="color: #000066; font-weight: bold;">.</span>panAngle = cameraSpeed <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mouseX</span> <span style="color: #000066; font-weight: bold;">-</span> lastMouseX<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> lastPanAngle<span style="color: #000066; font-weight: bold;">;</span>				
      camera<span style="color: #000066; font-weight: bold;">.</span>tiltAngle = cameraSpeed <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mouseY</span> <span style="color: #000066; font-weight: bold;">-</span> lastMouseY<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> lastTiltAngle<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
  <span style="color: #000000;">&#125;</span>
  camera<span style="color: #000066; font-weight: bold;">.</span>hover<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>On constate l&#8217;utilisation de certaines variable. Celles ci sont récupérées par un event mis dans le main qui update des varibles precise.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>84
85
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> MouseDown<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_UP</span><span style="color: #000066; font-weight: bold;">,</span> MouseUp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre>
</td>
</tr>
</table>
</div>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>90
91
92
93
94
95
96
97
98
99
100
101
102
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> MouseDown<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  lastPanAngle 	= camera<span style="color: #000066; font-weight: bold;">.</span>panAngle<span style="color: #000066; font-weight: bold;">;</span>
  lastTiltAngle 	= camera<span style="color: #000066; font-weight: bold;">.</span>tiltAngle<span style="color: #000066; font-weight: bold;">;</span>
  lastMouseX 		= <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">;</span>
  lastMouseY 		= <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mouseY</span><span style="color: #000066; font-weight: bold;">;</span>
  move 			= <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> MouseUp<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  move = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>updateAnimation va nous permettre d&#8217;animer tout les torus dans la scene. Pour cela à la création des torus je les ais pushé dans une variable qui va me permettre d&#8217;y avoir accés facilement. J&#8217;aurais tres bien pur les pusher dans un groupe, mais je voulais les animer 1 par 1 pour simuler un delay dans l&#8217;animation.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>121
122
123
124
125
126
127
128
129
</pre>
</td>
<td class="code">
<pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> updateAnimation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> r<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> r <span style="color: #000066; font-weight: bold;">&lt;</span> allTorus<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> r<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> 
  <span style="color: #000000;">&#123;</span>
    allTorus<span style="color: #000000;">&#91;</span>r<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>yaw<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    allTorus<span style="color: #000000;">&#91;</span>r<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>roll<span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">.</span>5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    allTorus<span style="color: #000000;">&#91;</span>r<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>pitch<span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">.</span>8<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>La derniére methode view.render(); fait reference à view, ce qui permet de mettre à jour le viewport.</p>
<p>Voilà, j&#8217;éspére vous avoir donnée une idée de comment marche away3D</p>
<p> <a href="http://www.cyrilpereira.com/upload/flash/away3d/torus/away3D.zip" target="_blank">Télécharger le code avec projet FlashDevelop</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2012/08/20/away3d-tutorial-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test your website with IE on mac</title>
		<link>http://www.cyrilpereira.com/2012/08/14/test-ie-on-mac/</link>
		<comments>http://www.cyrilpereira.com/2012/08/14/test-ie-on-mac/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 06:22:42 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=910</guid>
		<description><![CDATA[If you are like me a mac user, you can&#8217;t test your website on internet explorer. Here is a usefull link to test your page on internet explorer http://browsershots.org. How it works ? you select the browsers you want to&#8230;]]></description>
			<content:encoded><![CDATA[<p>If you are like me a mac user, you can&#8217;t test your website on internet explorer. </p>
<p>Here is a usefull link to test your page on internet explorer <a href="http://browsershots.org" target="_blank">http://browsershots.org</a>.</p>
<p>How it works ?</p>
<p>you select the browsers you want to use, and select your details, like colors, depth, and more.. then submit, and you will have many screenshots as you select browsers to test.</p>
<p>if you are a pc users you can download all the internet explorer version here <a href="http://tredosoft.com/Multiple_IE?page=1" target="_blank">http://tredosoft.com/Multiple_IE?page=1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2012/08/14/test-ie-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Bootstrap &#8211; Modal on Iphone solution</title>
		<link>http://www.cyrilpereira.com/2012/08/13/english-twitter-bootstrap-modal-on-iphone-solution/</link>
		<comments>http://www.cyrilpereira.com/2012/08/13/english-twitter-bootstrap-modal-on-iphone-solution/#comments</comments>
		<pubDate>Mon, 13 Aug 2012 03:38:19 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=888</guid>
		<description><![CDATA[On my last project, i had an issue about the modal with bootstrap. The problem was the position and the size of the modal, it was too big, and not well positionned and really slow. I tried to found a&#8230;]]></description>
			<content:encoded><![CDATA[<p>On my last project, i had an issue about the modal with bootstrap. The problem was the position and the size of the modal, it was too big, and not well positionned and really slow.</p>
<p>I tried to found a solution by javascript but finally the solution was more easy than i expected.</p>
<p>The solution was add just this part of code in your css file. In responsive design under 480px in width the modal will adapt correctly.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre>
</td>
<td class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@media (max-width: 480px)</span>
<span style="color: #00AA00;">&#123;</span>
    <span style="color: #6666ff;">.modal</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3%</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3%</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3%</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3%</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
    <span style="color: #6666ff;">.modal-body</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">max-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">350px</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
        overflow-y<span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
        -webkit-overflow-scrolling<span style="color: #00AA00;">:</span> touch<span style="color: #00AA00;">;</span>
     <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>get the bootstrap here <a href="http://twitter.github.com/bootstrap/" target="_blank">http://twitter.github.com/bootstrap/</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2012/08/13/english-twitter-bootstrap-modal-on-iphone-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hey What&#8217;s UP ?</title>
		<link>http://www.cyrilpereira.com/2012/07/26/hey-whats-up/</link>
		<comments>http://www.cyrilpereira.com/2012/07/26/hey-whats-up/#comments</comments>
		<pubDate>Thu, 26 Jul 2012 21:45:20 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=855</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2012/07/26/hey-whats-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sherlock</title>
		<link>http://www.cyrilpereira.com/2011/12/09/sherlock/</link>
		<comments>http://www.cyrilpereira.com/2011/12/09/sherlock/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 14:38:17 +0000</pubDate>
		<dc:creator>Cyril</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[glamrock]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.cyrilpereira.com/?p=532</guid>
		<description><![CDATA[Projet : Sherlock Agence : GlamRock Actionscript XML]]></description>
			<content:encoded><![CDATA[<ul class="skillslist">
<li><strong>Projet</strong> : Sherlock</li>
<li><strong>Agence</strong> : GlamRock</li>
</ul>
<ul class="skillslist">
<li><img src="/upload/skills/checked.jpg" alt="Code Capable" />Actionscript</li>
<li><img src="/upload/skills/checked.jpg" alt="Code Capable" />XML</li>
</ul>
<div style="clear:both;"></div>
<p><img src="/upload/clients/sherlock/sherlock1.jpg"  /></p>
<p><img src="/upload/clients/sherlock/sherlock2.jpg"  /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyrilpereira.com/2011/12/09/sherlock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
