<?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>Displayobject &#187; Flex</title>
	<atom:link href="http://www.displayobject.fr/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.displayobject.fr</link>
	<description>Back to the display list</description>
	<lastBuildDate>Mon, 09 Jan 2012 13:26:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Test Operation with Flash Builder and Zend AMF on mysql utf8 database</title>
		<link>http://www.displayobject.fr/2010/06/10/test-operation-with-flash-builder-and-zend-amf-on-mysql-utf8-database/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=test-operation-with-flash-builder-and-zend-amf-on-mysql-utf8-database</link>
		<comments>http://www.displayobject.fr/2010/06/10/test-operation-with-flash-builder-and-zend-amf-on-mysql-utf8-database/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 11:44:06 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[utf8]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.displayobject.fr/?p=505</guid>
		<description><![CDATA[The problem occurs when there are accented characters in an utf8 database (particularly common in french). The generated service works properly, but is not testable in Test Operation view.
Flash Builder displays an error advising to encode the content with the php method utf8_encode ()... <a href="http://www.displayobject.fr/2010/06/10/test-operation-with-flash-builder-and-zend-amf-on-mysql-utf8-database/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The problem occurs when there are accented characters in an utf8 database (particularly common in french).<br />
The generated service works properly, but cannot be tested in <em>Test Operation view</em>.<br />
Flash Builder displays an error advising to encode the content with the php method utf8_encode ()&#8230;<br />
<span id="more-505"></span><br />
<img src="http://www.displayobject.fr/wp-content/uploads/2010/06/flash-builder-zend-amf-utf8-error.png" alt="“InvocationTargetException:There was an error while invoking the operation. Check your operation inputs or server code and try invoking the operation again.<br />
Reason: An error occured while reading response sent by server. Try encoding the response suitably before sending it. e.g. If a database column contains UTF-8 characters then use utf8_encode() to encode its value before returning it from the operation." /></p>
<p>Oh ? Really ?<br />
After some test I remember what I always do before performing queries&#8230; And what is not in the Flash Builder generated service&#8230; Character set definition.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000088;">$stmt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysqli_prepare</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connection</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;SET NAMES UTF8;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">throwExceptionOnError</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">mysqli_stmt_execute</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stmt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">throwExceptionOnError</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>To put in the constructor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.displayobject.fr/2010/06/10/test-operation-with-flash-builder-and-zend-amf-on-mysql-utf8-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Fullscreen on a specific DisplayObject, deal with overlay and use hardware acceleration</title>
		<link>http://www.displayobject.fr/2010/04/29/fullscreen-on-a-specific-displayobject-overlay-and-hardware-acceleration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fullscreen-on-a-specific-displayobject-overlay-and-hardware-acceleration</link>
		<comments>http://www.displayobject.fr/2010/04/29/fullscreen-on-a-specific-displayobject-overlay-and-hardware-acceleration/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 11:47:31 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[acceleration]]></category>
		<category><![CDATA[DiplayObject]]></category>
		<category><![CDATA[Fullscreen]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[overlay]]></category>

		<guid isPermaLink="false">http://www.displayobject.fr/?p=420</guid>
		<description><![CDATA[There is several ways to show a specific zone/object in a Flash application in full-screen mode. The problems are to use hardware acceleration (interesting for video), to deal with possible overlay (display object above the target we want to show &#8230; <a href="http://www.displayobject.fr/2010/04/29/fullscreen-on-a-specific-displayobject-overlay-and-hardware-acceleration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There is several ways to show a specific zone/object in a Flash application in full-screen mode. The problems are to use hardware acceleration (interesting for video), to deal with possible overlay (display object above the target we want to show in full-screen mode) or to avoid with UI pixelization. And we have to consider various player versions and hardwares&#8230;<br />
<span id="more-420"></span><br />
<span id="result_box"><span style="background-color: #ffffff;"><br />
With Flash Player 9, hardware acceleration is only possible using </span></span>fullScreenSourceRect.<br />
With a simple implementation we have 2 problems :</p>
<ul>
<li> Our target is scaled, so the bigger the the screen is (or the smaller our target is) the more our UI is pixelized.</li>
<li> The DisplayObjects above our target will be included in our full-screen.</li>
</ul>
<p>With Flash Player 10,  <span id="result_box"><span style="background-color: #ffffff;">hardware acceleration is possible </span></span>using direct or gpu mode, but it&#8217;s not available for AIR and depends on hardware&#8230;<br />
<a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS2E9C7F3B-6A7C-4c5d-8ADD-5B23446FBEEB.html" target="_blank">Working with full-screen mode</a></p>
<p><span id="result_box"><span style="background-color: #ffffff;">The overlay can be managed during the application conception, but it can quickly become complicated and even impossible with a component that can be placed anywhere in an application</span></span>&#8230;</p>
<p>So I wrote a small class to simplify it (flash/flex).</p>
<p><strong>Example :</strong></p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="650" height="460">
      <param name="movie" value="http://www.displayobject.fr/projects/fullscreen/FullScreenTest.swf" />
      <param name="allowfullscreen" value="true" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://www.displayobject.fr/projects/fullscreen/FullScreenTest.swf" width="650" height="460" allowfullscreen="true">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<p><a href="http://www.displayobject.fr/projects/fullscreen/srcview/" target="_blank">Sources</a></p>
<p><strong>How does it works :</strong></p>
<p>Simple :</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> fullscreen:FullScreen = <span style="color: #000000; font-weight: bold;">new</span> FullScreen<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>;
fullscreen.<span style="color: #006600;">mode</span> = FullScreen.<span style="color: #006600;">RESIZE_HARDWARE</span>;
fullscreen.<span style="color: #006600;">toggleFulScreen</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>In resize mode our target must be resizable (<a href="http://www.displayobject.fr/2010/04/06/simple-component-invalidation-in-as3/" target="_blank">Simple component invalidation</a>) :</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyComp <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> <span style="color: #0066CC;">_width</span>:<span style="color: #0066CC;">Number</span>;
	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_height</span>:<span style="color: #0066CC;">Number</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MyComp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #0066CC;">public</span> override <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">_width</span> = value;
		_invalidate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #0066CC;">public</span> override <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">_width</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> override <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">_height</span> = value;
		_invalidate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #0066CC;">public</span> override <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">_height</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>The 4 modes :</strong></p>
<p><strong>FullScreen.RESIZE</strong><br />
Resize the target to screen size and place it at the highest depth in the display list.</p>
<ul>
<li style="padding-bottom: 20px;"><strong>Benefits </strong>:<br />
Keep a clean UI.<br />
Resize your target as you want.</li>
<li style="padding-bottom: 40px;"><strong>Drawback </strong>:<br />
Worst for ressources.<br />
Do not use with video without gpu or direct mode.</li>
</ul>
<p><strong>FullScreen.RESIZE_HARDWARE</strong><br />
Resize the target at screen size and place it at the highest depth in the display list.<br />
Try hardware acceleration using fullScreenSourceRect on the full stage.</p>
<ul>
<li style="padding-bottom: 20px;"><strong>Benefits </strong>:<br />
Keep a clean UI.<br />
Resize your target as you want.<br />
<span id="result_box"><span style="background-color: #ffffff; color: #000000;">Use fewer resources</span></span> than FullScreen.RESIZE.</li>
<li style="padding-bottom: 40px;"><strong>Drawback </strong>:<br />
<span id="result_box"><span style="background-color: #ffffff; color: #000000;">Use more resources</span></span> than FullScreen.SCALE.</li>
</ul>
<p><strong><br />
FullScreen.SCALE</strong><br />
Scale with fullScreenSourceRect (try hardware acceleration).</p>
<ul>
<li style="padding-bottom: 20px;"><strong>Benefits </strong>:<br />
Best for ressources.<br />
No need to resize target.</li>
<li style="padding-bottom: 40px;"><strong>Drawback </strong>:<br />
UI pixelisation<br />
Potential overlays problems.</li>
</ul>
<p><strong>FullScreen.SCALE_ABOVE</strong><br />
Scale with fullScreenSourceRect (try hardware acceleration).<br />
Place target on highest depth.</p>
<ul>
<li style="padding-bottom: 20px;"><strong>Benefits </strong>:<br />
Best for ressources<br />
Avoid overlay<br />
No need to resize target</li>
<li style="padding-bottom: 40px;"><strong>Drawback </strong>:<br />
UI pixelisation</li>
</ul>
<p>Links :</p>
<p><a href="http://www.flashstreamworks.com/archive.php?post_id=1241799250" target="_blank">Flash fullscreen best practices</a></p>
<p><a href="http://www.displayobject.fr/projects/fullscreen/srcview/" target="_blank">Sources</a></p>
<p><span id="result_box"><span>I will soon release a 0.2 version. </span></span><span id="result_box"><span style="background-color: #ffffff; color: #000000;">All ideas are welcome.</span></span><br />
<span id="result_box"><span>Feel free to point out to me the mistakes</span></span><span id="result_box"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.displayobject.fr/2010/04/29/fullscreen-on-a-specific-displayobject-overlay-and-hardware-acceleration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un debugger monstrueux</title>
		<link>http://www.displayobject.fr/2009/09/13/un-debugger-monstrueux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=un-debugger-monstrueux</link>
		<comments>http://www.displayobject.fr/2009/09/13/un-debugger-monstrueux/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 21:46:34 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[demonster]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://www.displayobject.fr/?p=90</guid>
		<description><![CDATA[Lors du développement d'une application Flash ou Flex il devient rapidement nécessaire d'utiliser un outil de debug permettant de tracer ce qui se passe dans les profondeurs du code... <a href="http://www.displayobject.fr/2009/09/13/un-debugger-monstrueux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-205" title="de-monster-debugger" src="http://www.displayobject.fr/wp-content/uploads/2009/09/de-monster-debugger.png" alt="de-monster-debugger" width="500" height="172" /></p>
<p>Lors du développement d&#8217;une application Flash ou Flex il devient rapidement nécessaire d&#8217;utiliser un outil de debug permettant de tracer ce qui se passe dans les profondeurs du code.</p>
<p>Le debug Player couplé au add-on Firefox Flash Tracer permet déjà de récupérer les trace dans le navigateur.<br />
Très utile pour voir ce qui ne va pas sans être obligé de recompiler l&#8217;application mais très limité.</p>
<p>Le <a href="http://demonsterdebugger.com/" target="_blank">De MonsterDebugger</a> proposé par le <a href="http://www.demonsters.com/" target="_blank">studio Demonster</a> nous permet tracer le détail des objets dans une appli AIR en utilisant la classe fournie :</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">MonsterDebugger.<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;here is a bug&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Plus intéressant :</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">MonsterDebugger.<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>label:<span style="color: #ff0000;">&quot;here is a bug&quot;</span>, <span style="color: #0066CC;">data</span>:<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;really&quot;</span>,<span style="color: #ff0000;">&quot;bad&quot;</span>,<span style="color: #ff0000;">&quot;bug&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Mais son job ne s&#8217;arrête pas la, il nous permet aussi de :</p>
<p>- Naviguer dans la structure de l&#8217;application via un tree<br />
- Editer en live de toute les  propriétés publiques depuis l&#8217;appli AIR<br />
- Exécuter les méthodes publiques depuis l&#8217;appli AIR</p>
<p>Une bonne habitude à prendre est de créer sa propre classe de debug afin de ne pas être dépendant du debugger choisi, de pouvoir facilement en changer et éventuellement de customiser ses debugs.  Une des clef de l&#8217;utilisation intuitive du debugger (pour moi en tout cas), est de simplifier au max son utilisation. Il est donc judicieux de placer notre classe de debug à la racine de notre appli afin de tracer sans avoir à ajouter un import&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * Debugger
 */</span>
package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> nl.<span style="color: #006600;">demonsters</span>.<span style="color: #006600;">debugger</span>.<span style="color: #006600;">MonsterDebugger</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Debugger
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _debugger:MonsterDebugger;
&nbsp;
		<span style="color: #808080; font-style: italic;">//////////////////////////////////////////</span>
		<span style="color: #808080; font-style: italic;">// PUBLIC STATICS METHODS</span>
		<span style="color: #808080; font-style: italic;">//////////////////////////////////////////</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">target</span>:<span style="color: #0066CC;">Object</span><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>_debugger == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
				_debugger = <span style="color: #000000; font-weight: bold;">new</span> MonsterDebugger<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> INFO<span style="color: #66cc66;">&#40;</span>from:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">message</span>:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">color</span>:<span style="color: #0066CC;">Number</span> = -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;INFO &quot;</span>, from, <span style="color: #0066CC;">message</span>, <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> ? <span style="color: #0066CC;">color</span>:0x000000<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> DEBUG<span style="color: #66cc66;">&#40;</span>from:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">message</span>:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">color</span>:<span style="color: #0066CC;">Number</span> = -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DEBUG&quot;</span>, from, <span style="color: #0066CC;">message</span>, <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> ? <span style="color: #0066CC;">color</span>:0x0080FF<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> WARN<span style="color: #66cc66;">&#40;</span>from:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">message</span>:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">color</span>:<span style="color: #0066CC;">Number</span> = -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;**WARN &quot;</span>, from, <span style="color: #0066CC;">message</span>, <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> ? <span style="color: #0066CC;">color</span>:0xFFAC00<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> FATAL<span style="color: #66cc66;">&#40;</span>from:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">message</span>:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">color</span>:<span style="color: #0066CC;">Number</span> = -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;**FATAL**&quot;</span>, from, <span style="color: #0066CC;">message</span>, <span style="color: #0066CC;">color</span> <span style="color: #66cc66;">!</span>= -<span style="color: #cc66cc;">1</span> ? <span style="color: #0066CC;">color</span>:0xFF0000<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">//////////////////////////////////////////</span>
		<span style="color: #808080; font-style: italic;">// PRIVATE STATICS METHODS</span>
		<span style="color: #808080; font-style: italic;">//////////////////////////////////////////</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> _debug<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">level</span>:<span style="color: #0066CC;">String</span>, from:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">message</span>:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">color</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			MonsterDebugger.<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>from, <span style="color: #0066CC;">message</span>, <span style="color: #0066CC;">color</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">level</span> + <span style="color: #ff0000;">&quot; &quot;</span> + from + <span style="color: #ff0000;">&quot; :: &quot;</span> + <span style="color: #0066CC;">message</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Pour conclure, De MonsterDebugger est un outils simple et efficace pour déboguer (en français s&#8217;il vous plait) et optimiser ses application Flash/Flex. On peut  regretter de ne pouvoir tracer et trier pa level (cf. classe ci dessus) et de ne pouvoir tracer à la fois un objet et un commentaire correspondant.</p>
<p>Peut-être dans les versions suivantes&#8230;</p>
<p><a href="http://demonsterdebugger.com/" target="_blank">De MonsterDebugger</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.displayobject.fr/2009/09/13/un-debugger-monstrueux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Afficher des chaines JSON valides dans le browser AMFPHP 1.9</title>
		<link>http://www.displayobject.fr/2009/08/28/afficher-des-chaines-json-valides-dans-le-browser-amfphp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=afficher-des-chaines-json-valides-dans-le-browser-amfphp</link>
		<comments>http://www.displayobject.fr/2009/08/28/afficher-des-chaines-json-valides-dans-le-browser-amfphp/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 23:22:16 +0000</pubDate>
		<dc:creator>Jonas</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[remoting]]></category>

		<guid isPermaLink="false">http://www.displayobject.fr/?p=72</guid>
		<description><![CDATA[Un peu frustré à l’idée de ne pouvoir afficher de chaine JSON valides dans le browser, j’ai jeté un coup d’oeil dans la classe php utilisée pour récupérer les services. Après investigation le « problème » se situe dans la classe core/shared/util/MethodTable.php. <a href="http://www.displayobject.fr/2009/08/28/afficher-des-chaines-json-valides-dans-le-browser-amfphp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Un peu frustré à l&#8217;idée de ne pouvoir afficher de chaine JSON valides dans le browser, j&#8217;ai jeté un coup d&#8217;oeil dans la classe php utilisée pour récupérer les services. Après investigation le &#8220;problème&#8221; se situe dans la classe core/shared/util/MethodTable.php.</p>
<p>Pour pouvoir entrer des emails :</p>
<p>lignes 381 :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$comment</span> <span style="color: #339933;">=</span> MethodTable<span style="color: #339933;">::</span><span style="color: #004000;">cleanComment</span><span style="color: #009900;">&#40;</span>strrstr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;@&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>devient :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$comment</span> <span style="color: #339933;">=</span> MethodTable<span style="color: #339933;">::</span><span style="color: #004000;">cleanComment</span><span style="color: #009900;">&#40;</span>strrstr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;* @&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Pour ne pas échapper les doubles quotes :</p>
<p>ligne 511 :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$comment</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>devient :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//$comment = str_replace(&quot;\&quot;&quot;, &quot;\\\&quot;&quot;, $comment);</span></pre></div></div>

<p>Sinon, à quand la 2.0 ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.displayobject.fr/2009/08/28/afficher-des-chaines-json-valides-dans-le-browser-amfphp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

