<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>FlashBannerOnline</title><link>http://blog.flashbanneronline.com</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/flashbanneronlineblog" /><description>Online Flash Banner Generator blog!</description><language>en</language><lastBuildDate>Sun, 26 Jun 2011 04:38:44 PDT</lastBuildDate><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/flashbanneronlineblog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="flashbanneronlineblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology</media:category><itunes:explicit>no</itunes:explicit><itunes:subtitle>Online Flash Banner Generator blog!</itunes:subtitle><itunes:category text="Technology" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">flashbanneronlineblog</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><title>Extract Swf file from Mochimedia Encrypted file – MochiDecrypter</title><link>http://blog.flashbanneronline.com/2011/06/extract-swf-file-from-mochimedia-encrypted-file-mochidecrypter/</link><category>ActionScript</category><category>Adobe AIR</category><category>Flash</category><category>Free Downloads</category><category>Air</category><category>blog.flashbanneronline.com</category><category>Decompile</category><category>Encrypted</category><category>environment</category><category>GUI</category><category>interface</category><category>MochiDecrypt</category><category>mochidecrypter</category><category>Mochimedia</category><category>software</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Sun, 26 Jun 2011 04:34:46 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=569</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/QN8D8BegA0msQgd0EVjxQ2_rGJg/0/da"><img src="http://feedads.g.doubleclick.net/~a/QN8D8BegA0msQgd0EVjxQ2_rGJg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QN8D8BegA0msQgd0EVjxQ2_rGJg/1/da"><img src="http://feedads.g.doubleclick.net/~a/QN8D8BegA0msQgd0EVjxQ2_rGJg/1/di" border="0" ismap="true"></img></a></p><p>Maybe  your website mochimedia and services that meet you and maybe many games by  this code, have seen you play, the method mochimedia emissions are primarily a  perloader that, along with a symbol lock is&#8230;<br />
Perhaps we were already being protected.</p>
<p>The software is now like a utility for Decompile files are locked with the above method.<br />
Swf file to your home and provides that any application can Decompile  getting there!</p>
<p>Is a simple GUI interface , Just your files Drag and Drop in your program.<br />
Program to break the lock file and extract the original file, and give you.<br />
The extracted files are saved in the original file.<br />
Meanwhile, right-click and select Browse File, you can also select your desired file.</p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/06/mochi_lock_iflashlord.jpg"><img class="size-full wp-image-575 alignnone" title="mochi_lock_iflashlord" src="http://blog.flashbanneronline.com/wp-content/uploads/2011/06/mochi_lock_iflashlord.jpg" alt="" width="465" height="273" /></a></p>
<blockquote><p>If you find a way to break the locks have security in Flash! you can expand your personal experience to share.</p></blockquote>
<p><strong>Programming environment:</strong></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/06/mochidecrypt_1.jpg"><img class="alignnone size-full wp-image-576" title="mochidecrypt_1" src="http://blog.flashbanneronline.com/wp-content/uploads/2011/06/mochidecrypt_1.jpg" alt="" width="468" height="310" /></a></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/06/mochidecrypt_2.jpg"><img class="alignnone size-full wp-image-577" title="mochidecrypt_2" src="http://blog.flashbanneronline.com/wp-content/uploads/2011/06/mochidecrypt_2.jpg" alt="" width="468" height="310" /></a></p>
<p>User Mode program is considered so Both in English and Persian Languages to give enough information to work with.</p>
<p><strong>Program Information:</strong></p>
<p>Version : 1.0.0<br />
Adobe Air Installer : <strong>Adobe Air 2.5 or higher</strong><br />
size: <strong>275 kb</strong><br />
Release date :  <strong>24 June 2011</strong><br />
Powered by :  <strong>Flash CS5.5 , ActionScript 3.o , Adobe Air</strong><br />
Designer and Programmer : <strong>Behrouz Pooladrag</strong></p>
<p><strong>Download:</strong></p>
<p><a title="دانلود آخرین نسخه MochiDecrypt با فرمت AIR" href="http://iflashlord.com/software/MochiDecrypt/MochiDecrypt_v1.air" target="_blank">Latest Release MochiDecrypt by format AIR</a> –Be installed on any system that is Have<a href="http://get.adobe.com/air/" target="_blank"> Adobe Air Installer</a>.</p>
<p><a title="دانلود آخرین نسخه MochiDecrypt با فرمت EXE" href="http://iflashlord.com/software/MochiDecrypt/MochiDecrypt_v1.exe" target="_blank">Latest Release MochiDecrypt by format EXE </a>-Be installed on any system that is Have<a href="http://get.adobe.com/air/" target="_blank"> Adobe Air Installer</a>.</p>
<p><strong>note:</strong></p>
<p>Windows 7 is better to run that program, right click and click Run as administrator option to run the program.</p>
<p><strong>Changes made in new versions</strong></p>
<p><strong>Version : 1.0.0</strong></p>
<p>The first version was created.</p>
<p><strong>Debug:</strong></p>
<p>If you have a problem or see an error in the program. You can be the same for bug fixes and improvements to the program tell me.</p>
<p>be successful.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=6W1MBAshU0Q:3iojRKAxWzo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=6W1MBAshU0Q:3iojRKAxWzo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=6W1MBAshU0Q:3iojRKAxWzo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=6W1MBAshU0Q:3iojRKAxWzo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=6W1MBAshU0Q:3iojRKAxWzo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=6W1MBAshU0Q:3iojRKAxWzo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=6W1MBAshU0Q:3iojRKAxWzo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=6W1MBAshU0Q:3iojRKAxWzo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=6W1MBAshU0Q:3iojRKAxWzo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=6W1MBAshU0Q:3iojRKAxWzo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Maybe your website mochimedia and services that meet you and maybe many games by this code, have seen you play, the method mochimedia emissions are primarily a perloader that, along with a symbol lock is&amp;#8230; Perhaps we were already being protected. The software is now like a utility for Decompile files are locked with the [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/06/extract-swf-file-from-mochimedia-encrypted-file-mochidecrypter/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><enclosure url="http://iflashlord.com/software/MochiDecrypt/MochiDecrypt_v1.exe" length="518668" type="application/x-msdownload" /><media:content url="http://iflashlord.com/software/MochiDecrypt/MochiDecrypt_v1.exe" fileSize="518668" type="application/x-msdownload" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>Maybe your website mochimedia and services that meet you and maybe many games by this code, have seen you play, the method mochimedia emissions are primarily a perloader that, along with a symbol lock is&amp;#8230; Perhaps we were already being protected. The</itunes:subtitle><itunes:summary>Maybe your website mochimedia and services that meet you and maybe many games by this code, have seen you play, the method mochimedia emissions are primarily a perloader that, along with a symbol lock is&amp;#8230; Perhaps we were already being protected. The software is now like a utility for Decompile files are locked with the [...]</itunes:summary><itunes:keywords>ActionScript, Adobe AIR, Flash, Free Downloads, Air, blog.flashbanneronline.com, Decompile, Encrypted, environment, GUI, interface, MochiDecrypt, mochidecrypter, Mochimedia, software</itunes:keywords></item><item><title>New templates Oval light added to flash banner online</title><link>http://blog.flashbanneronline.com/2011/06/new-templates-oval-light-added-to-flash-banner-online/</link><category>FlashBannerOnline</category><category>Banner</category><category>Flash</category><category>flashbanneronline</category><category>Oval Light</category><category>Template</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Sat, 25 Jun 2011 11:24:44 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=563</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/hO--A4xZ-tTjJOC73ImRo-vg9Qg/0/da"><img src="http://feedads.g.doubleclick.net/~a/hO--A4xZ-tTjJOC73ImRo-vg9Qg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/hO--A4xZ-tTjJOC73ImRo-vg9Qg/1/da"><img src="http://feedads.g.doubleclick.net/~a/hO--A4xZ-tTjJOC73ImRo-vg9Qg/1/di" border="0" ismap="true"></img></a></p><div>
<p><img src="http://www.flashbanneronline.com/nlfile/preview_screen_en.jpg" alt="" width="512" height="134" /></p>
<p>New template <strong>Oval Light</strong> Flash online banner added, you can now easily mold to your banner Select.</p>
<p><strong>An example of this banner you see below:</strong></p>
<p>For choosing this format as their banner templates follow the path below:</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="468" height="60" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"><param name="movie" value="http://b.flashbanneronline.com/2011/06/iflasjs5hw1307707486.swf" /><param name="quality" value="high" /><param name="menu" value="true" /><param name="scale" value="exactfit" /><embed type="application/x-shockwave-flash" width="468" height="60" src="http://b.flashbanneronline.com/2011/06/iflasjs5hw1307707486.swf" scale="exactfit" menu="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="high"></embed></object></p>
<p><strong>step1 -&gt; Banner Template BG -&gt; Oval Light</strong></p>
<p>You can easily select the desired template collection templates available through select.</p>
<p>visit flashbanneronline : <a title="online flash banner generator free!" href="http://www.flashbanneronline.com/" target="_blank">http://www.flashbanneronline.com</a>.</p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=p0GQkOlUS1U:EhaokHYmbIQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=p0GQkOlUS1U:EhaokHYmbIQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=p0GQkOlUS1U:EhaokHYmbIQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=p0GQkOlUS1U:EhaokHYmbIQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=p0GQkOlUS1U:EhaokHYmbIQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=p0GQkOlUS1U:EhaokHYmbIQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=p0GQkOlUS1U:EhaokHYmbIQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=p0GQkOlUS1U:EhaokHYmbIQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=p0GQkOlUS1U:EhaokHYmbIQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=p0GQkOlUS1U:EhaokHYmbIQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>New template Oval Light Flash online banner added, you can now easily mold to your banner Select. An example of this banner you see below: For choosing this format as their banner templates follow the path below: step1 -&amp;#62; Banner Template BG -&amp;#62; Oval Light You can easily select the desired template collection templates available [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/06/new-templates-oval-light-added-to-flash-banner-online/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><enclosure url="http://b.flashbanneronline.com/2011/06/iflasjs5hw1307707486.swf" length="35566" type="application/x-shockwave-flash" /><media:content url="http://b.flashbanneronline.com/2011/06/iflasjs5hw1307707486.swf" fileSize="35566" type="application/x-shockwave-flash" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>New template Oval Light Flash online banner added, you can now easily mold to your banner Select. An example of this banner you see below: For choosing this format as their banner templates follow the path below: step1 -&amp;#62; Banner Template BG -&amp;#62; Ova</itunes:subtitle><itunes:summary>New template Oval Light Flash online banner added, you can now easily mold to your banner Select. An example of this banner you see below: For choosing this format as their banner templates follow the path below: step1 -&amp;#62; Banner Template BG -&amp;#62; Oval Light You can easily select the desired template collection templates available [...]</itunes:summary><itunes:keywords>FlashBannerOnline, Banner, Flash, flashbanneronline, Oval Light, Template</itunes:keywords></item><item><title>optimize PHP code performances</title><link>http://blog.flashbanneronline.com/2011/06/optimize-php-code-performances/</link><category>PHP</category><category>Tutorials</category><category>banner online "banner online"</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Wed, 08 Jun 2011 13:57:21 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=557</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/Jp5QTjDM7mjmd7hG4bNtcHcE1WQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/Jp5QTjDM7mjmd7hG4bNtcHcE1WQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Jp5QTjDM7mjmd7hG4bNtcHcE1WQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/Jp5QTjDM7mjmd7hG4bNtcHcE1WQ/1/di" border="0" ismap="true"></img></a></p><ul>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li>
<li>Use echo’s multiple parameters instead of string concatenation.</li>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload</li>
<li>require_once() is expensive</li>
<li>Use full paths in includes and requires, less time spent on resolving the OS paths.</li>
<li>If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()</li>
<li>See if you can use strncasecmp, strpbrk and stripos instead of regex</li>
<li>str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4</li>
<li>If the function, such as string replacement function, accepts both  arrays and single characters as arguments, and if your argument list is  not too long, consider writing a few redundant replacement statements,  passing one character at a time, instead of one line of code that  accepts arrays as search and replace arguments.</li>
<li>It’s better to use select statements than multi if, else if, statements.</li>
<li>Error suppression with @ is very slow.</li>
<li>Turn on apache’s mod_deflate</li>
<li>Close your database connections when you’re done with them</li>
<li>$row[’id’] is 7 times faster than $row[id]</li>
<li>Error messages are expensive</li>
<li>Do not use functions inside of for loop, such as for ($x=0; $x &lt;  count($array); $x) The count() function gets called each time.</li>
<li>Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.</li>
<li>Incrementing a global variable is 2 times slow than a local var.</li>
<li>Incrementing an object property (eg. $this-&gt;prop++) is 3 times slower than a local variable.</li>
<li>Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.</li>
<li>Just declaring a global variable without using it in a function also  slows things down (by about the same amount as incrementing a local  var). PHP probably does a check to see if the global exists.</li>
<li>Method invocation appears to be independent of the number of methods  defined in the class because I added 10 more methods to the test class  (before and after the test method) with no change in performance.</li>
<li>Methods in derived classes run faster than ones defined in the base class.</li>
<li>A function call with one parameter and an empty function body takes  about the same time as doing 7-8 $localvar++ operations. A similar  method call is of course about 15 $localvar++ operations.</li>
<li>Surrounding your string by ‘ instead of ” will make things interpret  a little faster since php looks for variables inside “…” but not inside  ‘…’. Of course you can only do this when you don’t need to have  variables in the string.</li>
<li>When echoing strings it’s faster to separate them by comma instead  of dot. Note: This only works with echo, which is a function that can  take several strings as arguments.</li>
<li>A PHP script will be served at least 2-10 times slower than a static  HTML page by Apache. Try to use more static HTML pages and fewer  scripts.</li>
<li>Your PHP scripts are recompiled every time unless the scripts are  cached. Install a PHP caching product to typically increase performance  by 25-100% by removing compile times.</li>
<li>Cache as much as possible. Use memcached – memcached is a  high-performance memory object caching system intended to speed up  dynamic web applications by alleviating database load. OP code caches  are useful so that your script does not have to be compiled on every  request</li>
<li>When working with strings and you need to check that the string is  either of a certain length you’d understandably would want to use the  strlen() function. This function is pretty quick since it’s operation  does not perform any calculation but merely return the already known  length of a string available in the zval structure (internal C struct  used to store variables in PHP). However because strlen() is a function  it is still somewhat slow because the function call requires several  operations such as lowercase &amp; hashtable lookup followed by the  execution of said function. In some instance you can improve the speed  of your code by using an isset() trick.</li>
</ul>
<p><strong>Ex.</strong></p>
<pre class="brush: php; title: ; notranslate">
if (strlen($foo) &lt; 5) { echo &quot;Foo is too short&quot;; }
</pre>
<p><strong>vs.</strong></p>
<pre class="brush: php; title: ; notranslate">
if (!isset($foo{5})) { echo &quot;Foo is too short&quot;; }
</pre>
<ul>
<li>Calling isset() happens to be faster then strlen() because  unlike strlen(), isset() is a language construct and not a function  meaning that it’s execution does not require function lookups and  lowercase. This means you have virtually no overhead on top of the  actual code that determines the string’s length.</li>
<li>When incrementing or decrementing the value of the variable $i++  happens to be a tad slower then ++$i. This is something PHP specific and  does not apply to other languages, so don’t go modifying your C or Java  code thinking it’ll suddenly become faster, it won’t. ++$i happens to  be faster in PHP because instead of 4 opcodes used for $i++ you only  need 3. Post incrementation actually causes in the creation of a  temporary var that is then incremented. While pre-incrementation  increases the original value directly. This is one of the optimization  that opcode optimized like Zend’s PHP optimizer. It is a still a good  idea to keep in mind since not all opcode optimizers perform this  optimization and there are plenty of ISPs and servers running without an  opcode optimizer.</li>
<li>Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory.</li>
<li>Do not implement every data structure as a class, arrays are useful, too</li>
<li>Don’t split methods too much, think, which code you will really re-use</li>
<li>You can always split the code of a method later, when needed</li>
<li>Make use of the countless predefined functions</li>
<li>If you have very time consuming functions in your code, consider writing them as C extensions</li>
<li>Profile your code. A profiler shows you, which parts of your code  consumes how many time. The Xdebug debugger already contains a profiler.  Profiling shows you the bottlenecks in overview</li>
<li>mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%</li>
<li><a rel="external,nofollow" href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank">Excellent Article</a> about optimizing php by John Lim</li>
</ul>
<p>As Reihold Webber pointed to a post from <a rel="external,nofollow" href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank">John Lim</a> (found this article copied without state the source <a rel="external,nofollow" href="http://www.whenpenguinsattack.com/2006/07/21/optimizing-object-oriented-php" target="_blank">here</a>),  then i investigate further and truly that is an excellent best practice  tutorial for optimizing the php code performance, covered almost all  aspects from low level webserver configuration, PHP configuration,  coding styling, and performace comparisson as well.</p>
<p>Another good practice for better php performance as written in <a rel="external,nofollow" href="http://www.cluesheet.com/" target="_blank">cluesheet.com</a> are:</p>
<ul>
<li>Do use single quotes over double quotes.</li>
<li>Do use switch over lots of if statements</li>
<li>Do avoid testing loop conditionals with function tests every iteration eg. for($i=0;i&lt;=count($x);$i++){…</li>
<li>Do use foreach for looping collections/arrays. PHP4 items are byval, greater than PHP5 items are byref</li>
<li>Do consider using the Singleton Method when creating complex PHP classes.</li>
<li>Do use POST over GET for all values that will wind up in the database for TCP/IP packet performance reasons.</li>
<li>Do use ctype_alnum,ctype_alpha and ctype_digit over regular expression to test form value types for performance reasons.</li>
<li>Do use full file paths in production environment over  basename/fileexists/open_basedir to avoid performance hits for the  filesystem having to hunt through the file path. Once determined,  serialize and/or cache path values in a $_SETTINGS array.  $_SETTINGS["cwd"]=cwd(./);</li>
<li>Do use require/include over require_once/include_once to ensure proper opcode caching.</li>
<li>Do use tmpfile or tempnam for creating temp files/filenames</li>
<li>Do use a proxy to access web services (XML or JSOM) on foreign  domains using XMLHTTP to avoid cross-domain errors. eg.  foo.com&lt;–&gt;XMLHTTP&lt;–&gt;bar.com</li>
<li>Do use error_reporting (E_ALL); during debug.</li>
<li>Do set Apache allowoverride to “none” to improve Apache performance in accessing files/directories.</li>
<li>Do use a fast fileserver for serving static content (thttpd). static.mydomain.com, dynamic.mydomain.com</li>
<li>Do serialize application settings like paths into an associative array and cache or serialize that array after first execution.</li>
<li>Do use PHP output control buffering for page caching of heavilty accessed pages</li>
<li>Do use PDO prepare over native db prepare for statements. mysql_attr_direct_query=&gt;1</li>
<li>Do NOT use SQL wildcard select. eg. SELECT *</li>
<li>Do use database logic (queries, joins, views, procedures) over loopy PHP.</li>
<li>Do use shortcut syntax for SQL insers if not using PDO parameters  parameters. eg. INSERT INTO MYTABLE (FIELD1,FIELD2) VALUES  ((“x”,”y”),(“p”,”q”));</li>
</ul>
<p>Another Interesting articles about optimizing php performance:</p>
<ul>
<li><a rel="external,nofollow" href="http://www.mysqlperformanceblog.com/2006/08/09/cache-performance-comparison/" target="_blank">PHP &amp; Mysql Cache Performance Comparison</a></li>
<li><a rel="external,nofollow" href="http://talks.php.net/show/acc_php" target="_blank">Accelerating PHP Applications</a> Slide presentation International PHP Conference 2004</li>
<li><a rel="external,nofollow" href="http://www.ilovejackdaniels.com/php/caching-output-in-php/" target="_blank">Caching output in PHP</a></li>
</ul>
<p><a href="http://www.chazzuka.com/63-best-practice-to-optimize-php-code-performances-58/" target="_blank">source </a></p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} --> <!--[endif] -->&nbsp;</p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; line-height: normal; mso-outline-level: 1;"><strong><span style="font-size: 24.0pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-font-kerning: 18.0pt;">optimize PHP code performances</span></strong></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Nips1Ml6qOY:qL4j95kIBwc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Nips1Ml6qOY:qL4j95kIBwc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Nips1Ml6qOY:qL4j95kIBwc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Nips1Ml6qOY:qL4j95kIBwc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Nips1Ml6qOY:qL4j95kIBwc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Nips1Ml6qOY:qL4j95kIBwc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Nips1Ml6qOY:qL4j95kIBwc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Nips1Ml6qOY:qL4j95kIBwc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Nips1Ml6qOY:qL4j95kIBwc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Nips1Ml6qOY:qL4j95kIBwc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>If a method can be static, declare it static. Speed improvement is by a factor of 4. echo is faster than print.(* compare with list from phplens by John Lim) Use echo’s multiple parameters instead of string concatenation. Set the maxvalue for your for-loops before and not in the loop. Unset your variables to free [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/06/optimize-php-code-performances/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments></item><item><title>Understanding OOP – Introduction</title><link>http://blog.flashbanneronline.com/2011/04/understanding-oop-introduction/</link><category>ActionScript</category><category>Tutorials</category><category>abstraction</category><category>classes</category><category>function</category><category>get</category><category>import</category><category>internal</category><category>Number</category><category>package</category><category>private</category><category>properties</category><category>protected</category><category>public</category><category>set</category><category>tot</category><category>trace</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Thu, 21 Apr 2011 13:53:33 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=543</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/DjUCxRwvawPeVW_0Bh5SyNvifg8/0/da"><img src="http://feedads.g.doubleclick.net/~a/DjUCxRwvawPeVW_0Bh5SyNvifg8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/DjUCxRwvawPeVW_0Bh5SyNvifg8/1/da"><img src="http://feedads.g.doubleclick.net/~a/DjUCxRwvawPeVW_0Bh5SyNvifg8/1/di" border="0" ismap="true"></img></a></p><p>Everything that has an instance name,is an Object. Each object inherits  the properties and methods of its class. The Class is basically the  &#8220;prototype&#8221; of an Object,and as such,you can have as many objects as you  want from a single class.</p>
<p>In AS3,we&#8217;ve two ways of creating  objects,one is using the &#8220;new&#8221; keyword,and the other is to just declare  the variable typing its datatype(this method only works for top-level  classes like Strings,Arrays,ints,Numbers and so on).</p>
<pre class="brush: as3; title: ; notranslate">

var numberObject:Number = 5; //This is a Number object.
var myOtherNumber:Number = new Number(5); // this is also a Number object.
</pre>
<p>Lets take a look at how a custom Class is structured:</p>
<pre class="brush: as3; title: ; notranslate">

package myPackage
{
class MyClass
{

}
}
</pre>
<p>First we&#8217;ve the Package,which can be used to group classes with similar  functionality or that are meant to work with each other.Using the above  example,we could import that class to use like this,based on its  package:</p>
<pre class="brush: as3; title: ; notranslate">

//This imports only &quot;MyClass&quot;
import myPackage.MyClass;
</pre>
<pre class="brush: as3; title: ; notranslate">

//This imports all the classes inside the package &quot;myPackage&quot;
import myPackage.*;
</pre>
<p>Next,we&#8217;ve the class itself,and inside it is where we put our  variables,properties and function.Its important to note that the class  name should be the same as the file name.In our example,we should name  that file &#8220;MyClass.as&#8221;.</p>
<p>The most important function a class  has,is the constructor.That is what let us create an object based on  that class.Constructor functions are always <span style="color: #3366ff;">public</span>(in AS3).You won&#8217;t need a constructor for static classes(more on another tutorial).</p>
<pre class="brush: as3; title: ; notranslate">

public class MyClass
{
//this is the constructor function
public function MyClass() {

}
}
</pre>
<p>Objects can define how their methods and properties can be accessed by other objects.Those are called &#8220;<span style="color: #3366ff;">access modifiers</span>&#8220;.We&#8217;ve 4 types of access modifiers in AS3:</p>
<p><span style="color: #0000ff;">public</span>: Classes,methods or properties declared public can be accessed by any other object.<br />
<span style="color: #0000ff;">protected</span>: Methods or properties declared protected can be accessed by any subclass object(more on another tutorial).<br />
<span style="color: #0000ff;">private</span>: Methods or properties declared private can be accessed by the object itself only.<br />
<span style="color: #0000ff;">internal</span>: The class,property or method can only be used by classes inside this package.</p>
<p>Access modifiers are another step in providing <a href="http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29" target="_blank">abstraction</a> to programming.It lets you provide an object with methods that are  public(can be accessed anywhere),but the complex functionality is hidden  through the protected,private and internal modifiers.</p>
<p>To create a custom function or variable for your object,is simple:</p>
<pre class="brush: as3; title: ; notranslate">

public var myVar:String = &quot;This is myVar&quot;;

public function myFunction():void {
trace(&quot;This is myFunction&quot;);
}
</pre>
<p>To use our created class,we instantiate it using the &#8220;new&#8221; method</p>
<pre class="brush: as3; title: ; notranslate">

var myObject:MyClass = new MyClass();
</pre>
<p>To access its method or variables:</p>
<pre class="brush: as3; title: ; notranslate">

trace(myObject.myVar);
myObject.myFunction();
</pre>
<p>Classes also have <span style="color: #0000ff;">properties</span>(which differ  abit from variables).They normally are used to set internal variables  and possibly run another internal function. To create a property,you  need to use the special &#8220;<span style="color: #0000ff;">get</span>&#8221; and &#8220;<span style="color: #0000ff;">set</span>&#8221; method.<br />
&#8220;<span style="color: #0000ff;">get</span>&#8221; is used to retrieve the variable,but not allowing you to change its value(it simulates a read-only enviroment).<br />
&#8220;<span style="color: #0000ff;">set</span>&#8221; is used to write the variable,where you can run custom functions after changing its value:</p>
<pre class="brush: as3; title: ; notranslate">

private var _myProperty:String;

public function get myProperty():String {
return _myProperty;
}

public function set myProperty(value:String):void
{
_myProperty = value;
trace(&quot;myProperty value was changed! Value = &quot; + value);
}
</pre>
<p>The property is then handled just like a variable:</p>
<pre class="brush: as3; title: ; notranslate">

myObject.myProperty = &quot;myValue&quot;;
trace(myObject.myProperty);
</pre>
<p><strong>Output :</strong></p>
<p>myProperty value was changed! Value = myValue<br />
myValue</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=uPaq17Xr-n0:A17j2Gv477o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=uPaq17Xr-n0:A17j2Gv477o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=uPaq17Xr-n0:A17j2Gv477o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=uPaq17Xr-n0:A17j2Gv477o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=uPaq17Xr-n0:A17j2Gv477o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=uPaq17Xr-n0:A17j2Gv477o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=uPaq17Xr-n0:A17j2Gv477o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=uPaq17Xr-n0:A17j2Gv477o:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=uPaq17Xr-n0:A17j2Gv477o:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=uPaq17Xr-n0:A17j2Gv477o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Everything that has an instance name,is an Object. Each object inherits the properties and methods of its class. The Class is basically the &amp;#8220;prototype&amp;#8221; of an Object,and as such,you can have as many objects as you want from a single class. In AS3,we&amp;#8217;ve two ways of creating objects,one is using the &amp;#8220;new&amp;#8221; keyword,and the other [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/understanding-oop-introduction/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments></item><item><title>Flash Optimization – Activate &amp; Deactivate Events</title><link>http://blog.flashbanneronline.com/2011/04/flash-optimization-activate-deactivate-events/</link><category>ActionScript</category><category>Flash</category><category>actionscript</category><category>Activate</category><category>AS3</category><category>Deactivate</category><category>Event.ACTIVATE</category><category>Event.DEACTIVATE</category><category>flash player</category><category>Optimization</category><category>originalFrameRate</category><category>stage.frameRate</category><category>standbyFrameRate</category><category>Tricks</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Wed, 13 Apr 2011 18:50:44 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=533</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/v59UZYawwMeS0oG1TY7rVIPw1-w/0/da"><img src="http://feedads.g.doubleclick.net/~a/v59UZYawwMeS0oG1TY7rVIPw1-w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/v59UZYawwMeS0oG1TY7rVIPw1-w/1/da"><img src="http://feedads.g.doubleclick.net/~a/v59UZYawwMeS0oG1TY7rVIPw1-w/1/di" border="0" ismap="true"></img></a></p><p>Flash optimization is becoming increasing important &amp; with      alternative development tools that developers can use. We all have a      responsibility to build Flash elements that are efficient as much as      they are groundbreaking. As someone who feels responsible for the  future     of this great application, I am creating a Flash Optimization  series     that will help educate the Flash development community on  how to  keep    their Flash elements as lean as possible.</p>
<p>Flash Player 9 introduced two events (<strong>Event.ACTIVATE and Event.DEACTIVATE</strong>) that can assist you in fine-tuning your application so that it uses the fewest CPU cycles possible. These events <strong>allow you to detect when Flash Player gains or loses focus</strong>. As a result, code can be optimized to react to context changes.</p>
<p>Note: <strong>Use Event.ACTIVATE and Event.DEACTIVATE events to detect background inactivity and optimize your<br />
application appropriately.</strong></p>
<p>The following code listens to both events and dynamically changes the  frame rate to zero when the application loses its focus. For example,  the animation can lose focus when the user switches to another tab or  puts the application into the background:</p>
<pre class="brush: as3; title: ; notranslate">

var originalFrameRate:uint = stage.frameRate;
var standbyFrameRate:uint = 0;

stage.addEventListener ( Event.ACTIVATE, onActivate );
stage.addEventListener ( Event.ACTIVATE, onDeactivate );

function onActivate ( e:Event ):void
{
// restore original frame rate
stage.frameRate = originalFrameRate;
}

function onDeactivate ( e:Event ):void
{
// set frame rate to 0
stage.frameRate = standbyFrameRate;
}
</pre>
<p><strong>When the application gains focus again, the frame rate is reset to its original value</strong>.  Instead of changing the frame rate dynamically, you could also consider  making other optimizations, such as freezing and unfreezing objects.  The activate and deactivate events allow you to implement a similar  mechanism to the “Pause and Resume” feature sometimes found on mobile  devices and Net books.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=kTuwc4LXiuk:m5Cyd6auABM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=kTuwc4LXiuk:m5Cyd6auABM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=kTuwc4LXiuk:m5Cyd6auABM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=kTuwc4LXiuk:m5Cyd6auABM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=kTuwc4LXiuk:m5Cyd6auABM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=kTuwc4LXiuk:m5Cyd6auABM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=kTuwc4LXiuk:m5Cyd6auABM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=kTuwc4LXiuk:m5Cyd6auABM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=kTuwc4LXiuk:m5Cyd6auABM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=kTuwc4LXiuk:m5Cyd6auABM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Flash optimization is becoming increasing important &amp;#38; with alternative development tools that developers can use. We all have a responsibility to build Flash elements that are efficient as much as they are groundbreaking. As someone who feels responsible for the future of this great application, I am creating a Flash Optimization series that will help [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/flash-optimization-activate-deactivate-events/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments></item><item><title>Flash Optimization – Freezing And Unfreezing Objects</title><link>http://blog.flashbanneronline.com/2011/04/flash-optimization-freezing-and-unfreezing-objects/</link><category>ActionScript</category><category>Flash</category><category>Tutorials</category><category>addChild</category><category>addEventListener</category><category>as3 frame_constructed</category><category>contains</category><category>currentTarget</category><category>ENTER_FRAME</category><category>Event.ACTIVATE</category><category>Event.DEACTIVATE</category><category>EXIT_FRAME</category><category>FRAME_CONSTRUCTED</category><category>Freezing</category><category>freezing a movie clip in flash</category><category>Keyboard.LEFT</category><category>Keyboard.RIGHT</category><category>KeyboardEvent</category><category>keyCode</category><category>keyIsDown</category><category>Loader</category><category>loader class as3 stop movie</category><category>Objects</category><category>play()</category><category>removeChild</category><category>simply to play the movieclip in flash</category><category>Unfreezing</category><category>unloadAndStop</category><category>URLRequest</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Wed, 13 Apr 2011 03:29:24 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=531</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/QTWc8lpzsODoQsr_XxZsI8uNUjs/0/da"><img src="http://feedads.g.doubleclick.net/~a/QTWc8lpzsODoQsr_XxZsI8uNUjs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QTWc8lpzsODoQsr_XxZsI8uNUjs/1/da"><img src="http://feedads.g.doubleclick.net/~a/QTWc8lpzsODoQsr_XxZsI8uNUjs/1/di" border="0" ismap="true"></img></a></p><p>Flash optimization is becoming increasing important &amp; with     alternative development tools that developers can use. We all have a     responsibility to build Flash elements that are efficient as much as     they are groundbreaking. As someone who feels responsible for the future     of this great application, I am creating a Flash Optimization series     that will help educate the Flash development community on how to  keep    their Flash elements as lean as possible.</p>
<p>To optimize your code, <strong>always freeze and unfreeze your objects</strong>.  Freezing and unfreezing are important for all objects, but are  especially important for display objects. Even if display objects are no  longer in the display list and are waiting to be garbage collected,<strong> they could still be using CPU-intensive code</strong>.</p>
<p>For example, <strong>they can still be using Event.ENTER_FRAME</strong>. As a result, <strong>it is critical to freeze and unfreeze objects properly with the Event.REMOVED_FROM_STAGE and Event.ADDED_TO_STAGE events</strong>. The following example shows a movie clip<br />
playing on stage that interacts with the keyboard:</p>
<pre class="brush: as3; title: ; notranslate">

// Listen to keyboard events
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyIsUp);

// Create object to store key states
var keys:Dictionary = new Dictionary(true);

function keyIsDown(e:KeyboardEvent):void
{
// Remember that the key was pressed
keys[e.keyCode] = true;

if (e.keyCode==Keyboard.LEFT || e.keyCode==Keyboard.RIGHT)
{
runningBoy.play();
}
}

function keyIsUp(e:KeyboardEvent):void
{
// Remember that the key was released
keys[e.keyCode] = false;

for each (var value:Boolean in keys)
if ( value ) return;
runningBoy.stop();
}

runningBoy.addEventListener(Event.ENTER_FRAME, handleMovement);
runningBoy.stop();

var currentState:Number = runningBoy.scaleX;
var speed:Number = 15;

function handleMovement(e:Event):void
{
if (keys[Keyboard.RIGHT])
{
e.currentTarget.x += speed;
e.currentTarget.scaleX = currentState;
} else if (keys[Keyboard.LEFT])
{
e.currentTarget.x -= speed;
e.currentTarget.scaleX = -currentState;
}
}
</pre>
<p>When the Remove button is clicked, the movie clip is removed from the display list:</p>
<pre class="brush: as3; title: ; notranslate">

// Show or remove running boy
showBtn.addEventListener (MouseEvent.CLICK,showIt);
removeBtn.addEventListener (MouseEvent.CLICK,removeIt);

function showIt (e:MouseEvent):void
{
addChild (runningBoy);
}

function removeIt(e:MouseEvent):void
{
if (contains(runningBoy)) removeChild(runningBoy);
}
</pre>
<p><strong>Even when removed from the display list, the movie clip still dispatches the Event.ENTER_FRAME event</strong>. The movie<br />
clip still runs, but it is not rendered. To handle this situation correctly, <strong>listen to the proper events and remove event listeners</strong>, to prevent CPU-intensive code from being executed:</p>
<pre class="brush: as3; title: ; notranslate">

// Listen to Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE
runningBoy.addEventListener(Event.ADDED_TO_STAGE,activate);
runningBoy.addEventListener(Event.REMOVED_FROM_STAGE,deactivate);

function activate(e:Event):void
{
// Restart everything
e.currentTarget.addEventListener(Event.ENTER_FRAME,handleMovement);
}

function deactivate(e:Event):void
{
// Freeze the running boy – consumes fewer CPU resources when not shown
e.currentTarget.removeEventListener(Event.ENTER_FRAME,handleMovement);
e.currentTarget.stop();
}
</pre>
<p>When the Show button is pressed, <strong>the movie clip is restarted, it listens to Event.ENTER_FRAME events again</strong>, and the<br />
keyboard correctly controls the movie clip.</p>
<p>Note: If a display object is removed from the display list, setting  its reference to null after removing it does not ensure that the object  is frozen. If the garbage collector doesn’t run, the object continues to  consume memory and CPU processing, even though the object is no longer  displayed. <strong>To make sure that the object consumes the least CPU  processing possible, make sure that you completely freeze it when  removing it from the display list. </strong></p>
<p>Since Flash Player 10, if the playhead encounters an empty frame, the  display object is automatically frozen even if you did not implement  any freezing behavior.</p>
<p>The concept of freezing is also important when loading remote content  with the Loader class. When using the Loader class with Flash Player 9,  it was necessary to manually freeze content by listening to the  Event.UNLOAD event dispatched by the LoaderInfo object. Every object had  to be manually frozen, which was a non-trivial task. Flash Player 10  introduced an important <strong>new method on the Loader class called unloadAndStop()</strong>. This method <strong>allows  you to unload a SWF file, automatically freeze every object in the  loaded SWF file, and force the garbage collector to run</strong>.</p>
<p>In the following code, the <strong>SWF file is loaded and then unloaded using the unload() method</strong>, which requires more processing and manual freezing:</p>
<pre class="brush: as3; title: ; notranslate">

var loader:Loader = new Loader();

loader.load ( new URLRequest ( “content.swf” ) );

addChild ( loader );

stage.addEventListener ( MouseEvent.CLICK, unloadSWF );

function unloadSWF ( e:MouseEvent ):void
{
// Unload the SWF file with no automatic object deactivation
// All deactivation must be processed manually
loader.unload();
}
</pre>
<p>A best practice is to <strong>use the unloadAndStop() method, which handles the freezing natively and forces the garbage<br />
collecting process to run</strong>:</p>
<pre class="brush: as3; title: ; notranslate">

var loader:Loader = new Loader();

loader.load ( new URLRequest ( “content.swf” ) );

addChild ( loader );

stage.addEventListener ( MouseEvent.CLICK, unloadSWF );

function unloadSWF ( e:MouseEvent ):void
{
// Unload the SWF file with automatic object deactivation
// All deactivation is handled automatically
loader.unloadAndStop();
}
</pre>
<p>The following<strong> actions occur when the unloadAndStop()</strong> method is called:<br />
• Sounds are stopped.<br />
• Listeners registered to the SWF file’s main timeline are removed.<br />
• Timer objects are stopped.<br />
• Hardware peripheral devices (such as camera and microphone) are released.<br />
• Every movie clip is stopped.<br />
• Dispatching of Event.ENTER_FRAME, Event.FRAME_CONSTRUCTED, Event.EXIT_FRAME, Event.ACTIVATE and Event.DEACTIVATE is stopped.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=CdOnwMGwEXk:ke4c2Gj44_A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=CdOnwMGwEXk:ke4c2Gj44_A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=CdOnwMGwEXk:ke4c2Gj44_A:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=CdOnwMGwEXk:ke4c2Gj44_A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=CdOnwMGwEXk:ke4c2Gj44_A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=CdOnwMGwEXk:ke4c2Gj44_A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=CdOnwMGwEXk:ke4c2Gj44_A:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=CdOnwMGwEXk:ke4c2Gj44_A:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=CdOnwMGwEXk:ke4c2Gj44_A:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=CdOnwMGwEXk:ke4c2Gj44_A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Flash optimization is becoming increasing important &amp;#38; with alternative development tools that developers can use. We all have a responsibility to build Flash elements that are efficient as much as they are groundbreaking. As someone who feels responsible for the future of this great application, I am creating a Flash Optimization series that will help [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/flash-optimization-freezing-and-unfreezing-objects/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">2</slash:comments></item><item><title>Flash Optimization – Freeing Memory</title><link>http://blog.flashbanneronline.com/2011/04/flash-optimization-freeing-memory/</link><category>ActionScript</category><category>Adobe AIR</category><category>Flash</category><category>Tutorials</category><category>actionscript</category><category>Air</category><category>BitmapData</category><category>CPU-intensive</category><category>creation of a matching game with flash and as3</category><category>dispose();</category><category>disposeXML</category><category>disposexml air</category><category>flash player</category><category>freeing a sprite from memory as3</category><category>garbage collection</category><category>memory flash banner</category><category>null</category><category>Object</category><category>performance</category><category>references</category><category>Sprite</category><category>System</category><category>tot</category><category>totalMemory</category><category>XML</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Sun, 10 Apr 2011 16:33:57 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=525</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/rjzNZf-_vahShPUB-RVYgQUWVJM/0/da"><img src="http://feedads.g.doubleclick.net/~a/rjzNZf-_vahShPUB-RVYgQUWVJM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/rjzNZf-_vahShPUB-RVYgQUWVJM/1/da"><img src="http://feedads.g.doubleclick.net/~a/rjzNZf-_vahShPUB-RVYgQUWVJM/1/di" border="0" ismap="true"></img></a></p><p>Flash optimization is becoming increasing important &amp; with     alternative development tools that developers can use. We all have a     responsibility to build Flash elements that are efficient as much as     they are groundbreaking. As someone who feels responsible for the future     of this great application, I am creating a Flash Optimization series     that will help educate the Flash development community on how to  keep    their Flash elements as lean as possible.</p>
<p>You cannot launch the <strong>garbage collector</strong> directly in the release  version of Flash Player. To make sure that an object is garbage  collected, delete all references to the object. Keep in mind that the  old delete operator used in ActionScript 1.0 and 2.0 behaves differently  in ActionScript 3.0. It can only be used to delete dynamic properties  on a dynamic object.</p>
<p>Note: You can call the garbage collector directly in Adobe® AIR® and in the debug version of Flash Player.</p>
<p>For example, the following code sets a Sprite reference to null:</p>
<pre class="brush: as3; title: ; notranslate">

var mySprite:Sprite = new Sprite();

// Set the reference to null, so that the garbage collector removes it from memory
 mySprite = null;
</pre>
<p>Remember that when an object is set to null, it is not necessarily  removed from memory. Sometimes the garbage collector does not run, if  available memory is not considered low enough. <strong>Garbage collection is not predictable</strong>.</p>
<p><strong>Memory allocation, rather than object deletion, triggers garbage collection</strong>. When the garbage collector runs, it finds graphs of objects that haven’t been collected yet.<strong> It detects inactive objects in the graphs by finding objects that reference each other, but that the application no longer uses</strong>. Inactive objects detected this way are deleted.</p>
<p>In large applications,<strong> this process can be CPU-intensive and can affect performance and generate a noticeable slowdown in the application</strong>. <strong>Try to limit garbage collection passes by reusing objects as much as possible</strong>.</p>
<p>Also,<strong> set references to null</strong>, when possible, <strong>so that the garbage collector spends less processing time finding the objects</strong>. Think of garbage collection as insurance, and always manage object lifetimes explicitly, when possible.</p>
<p>Note: Setting a reference to a display object to null does not ensure  that the object is frozen. The object continues consume CPU cycles  until it is garbage collected. <strong>Make sure that you properly deactivate your object before setting its reference to null</strong>.</p>
<p><strong>The garbage collector can be launched using the System.gc()  method, available in Adobe AIR and in the debug version of Flash Player</strong>.  The profiler bundled with Adobe® Flash® Builder™ allows you to start  the garbage collector manually. Running the garbage collector <strong>allows you to see how your application responds and whether objects are correctly deleted from memory</strong>.</p>
<p>Note: If an object was used as an event listener, another object can reference it. If so, <strong>remove event listeners using the removeEventListener()method before setting the references to null</strong>.</p>
<p>Fortunately, the amount of memory used by bitmaps can be instantly reduced. For example, the <strong>BitmapData class includes a dispose() method</strong>.  The next example creates a BitmapData instance of 1.8 MB. The current  memory in use grows to 1.8 MB, and the System.totalMemory property  returns a smaller value:</p>
<pre class="brush: as3; title: ; notranslate">

trace(System.totalMemory / 1024);
 // output: 43100

// Create a BitmapData instance
 var image:BitmapData = new BitmapData(800, 600);

trace(System.totalMemory / 1024);
 // output: 44964
</pre>
<p>Next, <strong>the BitmapData is manually removed</strong> (disposed) from memory and the memory use is once again checked:</p>
<pre class="brush: as3; title: ; notranslate">

trace(System.totalMemory / 1024);
 // output: 43100

// Create a BitmapData instance
 var image:BitmapData = new BitmapData(800, 600);

trace(System.totalMemory / 1024);
 // output: 44964

image.dispose();
 image = null;

trace(System.totalMemory / 1024);
 // output: 43084
</pre>
<p>Although the dispose()method removes the pixels from memory, the <strong>reference must still be set to null to release it<br />
completely</strong>. Always call the dispose() method and set the reference to null when you no longer need a BitmapData<br />
object, so that memory is freed immediately.</p>
<p>Note: Flash Player 10.1 and AIR 1.5.2 introduce <strong>a new method called disposeXML() on the System class</strong>. This method<br />
<strong>allows you to make an XML object immediately available for garbage collection</strong>, by passing the XML tree as a parameter.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Em_7HorP-5Q:W6sctPvX7OI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Em_7HorP-5Q:W6sctPvX7OI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Em_7HorP-5Q:W6sctPvX7OI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Em_7HorP-5Q:W6sctPvX7OI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Em_7HorP-5Q:W6sctPvX7OI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Em_7HorP-5Q:W6sctPvX7OI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Em_7HorP-5Q:W6sctPvX7OI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Em_7HorP-5Q:W6sctPvX7OI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=Em_7HorP-5Q:W6sctPvX7OI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=Em_7HorP-5Q:W6sctPvX7OI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Flash optimization is becoming increasing important &amp;#38; with alternative development tools that developers can use. We all have a responsibility to build Flash elements that are efficient as much as they are groundbreaking. As someone who feels responsible for the future of this great application, I am creating a Flash Optimization series that will help [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/flash-optimization-freeing-memory/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments></item><item><title>Flash Optimization – Object Pooling</title><link>http://blog.flashbanneronline.com/2011/04/flash-optimization-object-pooling/</link><category>ActionScript</category><category>Flash</category><category>Tutorials</category><category>actionscript</category><category>AS3</category><category>beginFill</category><category>disposeSprite</category><category>drawCircle</category><category>getSprite</category><category>Object Pooling</category><category>Optimization</category><category>package</category><category>remove</category><category>removeChildAt</category><category>Sprite</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Sat, 09 Apr 2011 21:08:13 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=519</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/AOCKjmFf6G9M3SPAxasvGzoBKyA/0/da"><img src="http://feedads.g.doubleclick.net/~a/AOCKjmFf6G9M3SPAxasvGzoBKyA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/AOCKjmFf6G9M3SPAxasvGzoBKyA/1/da"><img src="http://feedads.g.doubleclick.net/~a/AOCKjmFf6G9M3SPAxasvGzoBKyA/1/di" border="0" ismap="true"></img></a></p><p>Flash optimization is becoming increasing important &amp; with    alternative development tools that developers can use. We all have a    responsibility to build Flash elements that are efficient as much as    they are groundbreaking. As someone who feels responsible for the future    of this great application, I am creating a Flash Optimization series    that will help educate the Flash development community on how to keep    their Flash elements as lean as possible.</p>
<p>Another important optimization is called <strong>object pooling, which involves reusing objects over time</strong>.</p>
<p>You create a defined number of objects during the initialization of your application and store them inside a pool, such as an <strong>Array or Vector object</strong>. <strong>Once you are done with an object, you deactivate it so that it does not consume CPU resources, and<br />
you remove all mutual references</strong>.</p>
<p>However, <strong>you DO NOT set the references to null, which would make it eligible for garbage collection</strong>. You just put the object back into the pool, and <strong>retrieve it when you need a new object</strong>. Reusing objects reduces the need to instantiate objects, which can be expensive. It also <strong>reduces the chances of the garbage collector running, which can slow down your application</strong>. The following code illustrates the object pooling technique:</p>
<pre class="brush: as3; title: ; notranslate">

package
 {
 import flash.display.Sprite;

public final class SpritePool
 {
 private static var MAX_VALUE:uint;
 private static var GROWTH_VALUE:uint;
 private static var counter:uint;
 private static var pool:Vector.&lt;Sprite&gt;;
 private static var currentSprite:Sprite;

public static function initialize( maxPoolSize:uint, growthValue:uint ):void
 {
 MAX_VALUE = maxPoolSize;
 GROWTH_VALUE = growthValue;
 counter = maxPoolSize;

var i:uint = maxPoolSize;

pool = new Vector.&lt;Sprite&gt;(MAX_VALUE);
 while( –i &gt; -1 )
 pool[i] = new Sprite();
 }

public static function getSprite():Sprite
 {
 if ( counter &gt; 0 )
 return currentSprite = pool[--counter];

var i:uint = GROWTH_VALUE;
 while( –i &gt; -1 )

pool.unshift ( new Sprite() );
 counter = GROWTH_VALUE;
 return getSprite();
 }

public static function disposeSprite(disposedSprite:Sprite):void
 {
 pool[counter++] = disposedSprite;
 }
 }
 }
</pre>
<p><strong>The SpritePool class creates a pool of new objects at the initialization of the application.</strong><br />
The <strong>getSprite() method returns instances of these objects</strong>, and the <strong>disposeSprite() method releases them</strong>.  The code allows the pool to grow when it has been consumed completely.  It’s also possible to create a fixed-size pool where new objects would  not be allocated when the pool is exhausted. Try to avoid creating new  objects in loops, if possible.</p>
<p>The following code uses the SpritePool class to retrieve new instances:</p>
<pre class="brush: as3; title: ; notranslate">

const MAX_SPRITES:uint = 100;
 const GROWTH_VALUE:uint = MAX_SPRITES &gt;&gt; 1;
 const MAX_NUM:uint = 10;

SpritePool.initialize ( MAX_SPRITES,  GROWTH_VALUE );

var currentSprite:Sprite;
 var container:Sprite = SpritePool.getSprite();

addChild ( container );

for ( var i:int = 0; i&lt; MAX_NUM; i++ )
 {
 for ( var j:int = 0; j&lt; MAX_NUM; j++ )
 {
 currentSprite = SpritePool.getSprite();
 currentSprite.graphics.beginFill ( 0×990000 );
 currentSprite.graphics.drawCircle ( 10, 10, 10 );
 currentSprite.x = j * (currentSprite.width + 5);
 currentSprite.y = i * (currentSprite.width + 5);
 container.addChild ( currentSprite );
 }
 }
</pre>
<p>The following code removes all the display objects from the display list when the mouse is clicked, and reuses them<br />
later for another task:</p>
<pre class="brush: as3; title: ; notranslate">

stage.addEventListener ( MouseEvent.CLICK, removeDots );

function removeDots ( e:MouseEvent ):void
 {
 while (container.numChildren &gt; 0 )
 SpritePool.disposeSprite (container.removeChildAt(0) as Sprite );
 }
</pre>
<p>Note: The pool vector always references the Sprite objects. If you want to remove the object from memory completely, you<br />
would need a dispose() method on the SpritePool class, which would remove all remaining references.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=rqXNipZd_II:fw0yAtyF1fA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=rqXNipZd_II:fw0yAtyF1fA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=rqXNipZd_II:fw0yAtyF1fA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=rqXNipZd_II:fw0yAtyF1fA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=rqXNipZd_II:fw0yAtyF1fA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=rqXNipZd_II:fw0yAtyF1fA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=rqXNipZd_II:fw0yAtyF1fA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=rqXNipZd_II:fw0yAtyF1fA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=rqXNipZd_II:fw0yAtyF1fA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=rqXNipZd_II:fw0yAtyF1fA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Flash optimization is becoming increasing important &amp;#38; with alternative development tools that developers can use. We all have a responsibility to build Flash elements that are efficient as much as they are groundbreaking. As someone who feels responsible for the future of this great application, I am creating a Flash Optimization series that will help [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/flash-optimization-object-pooling/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments></item><item><title>RSS Reader for FlashBannerOnline Blog!</title><link>http://blog.flashbanneronline.com/2011/04/rss-reader-for-flashbanneronline-blog/</link><category>Adobe AIR</category><category>Flash</category><category>Free Downloads</category><category>Air</category><category>Banner</category><category>Blog</category><category>blog.flashbanneronline.com</category><category>flashbanneronline</category><category>headlines</category><category>Reader</category><category>RSS</category><category>tot</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Sat, 09 Apr 2011 03:08:43 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=506</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/pM7KX31ZLtgaHnUaINvJlBU7drU/0/da"><img src="http://feedads.g.doubleclick.net/~a/pM7KX31ZLtgaHnUaINvJlBU7drU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/pM7KX31ZLtgaHnUaINvJlBU7drU/1/da"><img src="http://feedads.g.doubleclick.net/~a/pM7KX31ZLtgaHnUaINvJlBU7drU/1/di" border="0" ismap="true"></img></a></p><p>Total primary goal , to create a tool with a different environment of the software available for more enjoyable to follow site information is complete and current version of growth and achieve sufficient as a tool for the complete facility Find and follow RSS feeds will , give your loved ones will be .</p>
<p><strong>The current version of the program , the following features will provide you :</strong><br />
1 &#8211; View headlines last this blog content ( in future versions of supplemental feed Add the desired user can be created )<br />
2 &#8211; Find a brief description in relation to content<br />
3 &#8211; Settings related to the time information from server Refresh<br />
4 &#8211; Settings related to the pause interval between each display<br />
5 &#8211; Save the Last Data Feed and performance if being offline<br />
And &#8230;</p>
<p><strong>Images of the Environment Program :</strong></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_1.jpg"><img class="aligncenter size-full wp-image-513" title="rssreader_en_1" src="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_1.jpg" alt="" width="473" height="326" /></a></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_1.jpg"></a><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_2.jpg"><img class="aligncenter size-full wp-image-514" title="rssreader_en_2" src="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_2.jpg" alt="" width="473" height="326" /></a></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_2.jpg"></a><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_3.jpg"><img class="aligncenter size-full wp-image-515" title="rssreader_en_3" src="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/rssreader_en_3.jpg" alt="" width="473" height="326" /></a></p>
<h1>Download :</h1>
<p>Must install <a href="http://www.adobe.com/go/getair/" target="_blank">Adobe AIR</a> is installed on your system.</p>
<p><strong>Adobe Air format</strong></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/IFLashLord_RSS_Reader_en_v1.1.air" target="_blank">ِDownload FlashBannerOnline RSS Reader</a> (air format)</p>
<p><strong>Adobe Air EXE format</strong></p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/IFLashLord_RSS_Reader_en_v1.1.exe" target="_blank">ِDownload FlashBannerOnline RSS Reader</a> (exe format)</p>
<blockquote><p><strong>Note :</strong><br />
To run on Windows 7 is better , right click on the program and click Run as administrator option to run the program .</p></blockquote>
<p><strong>Changes made in new versions</strong></p>
<p><strong>Version 1.1</strong><br />
Stop rotating display at the content display mouse button and box description , was added .</p>
<p><del><strong>Version 1.0</strong></del><br />
First version created .<br />
<strong>Bug :</strong><br />
If the problem or error in the program can be seen in the same comment more bug fixes and improvements to my program tell (with this post comment <img src='http://blog.flashbanneronline.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  )</p>
<blockquote><p>the Persian Language of this software <a href="http://blog.iflashlord.com/?p=904" target="_blank">update Here</a>.</p></blockquote>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 1296px; width: 1px; height: 1px; overflow: hidden;">برای نصب می بایست Adobe AIR بر روی سیستم شما نصب باشد،</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=nhjMPGb15-E:dpDgvCAHvBk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=nhjMPGb15-E:dpDgvCAHvBk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=nhjMPGb15-E:dpDgvCAHvBk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=nhjMPGb15-E:dpDgvCAHvBk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=nhjMPGb15-E:dpDgvCAHvBk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=nhjMPGb15-E:dpDgvCAHvBk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=nhjMPGb15-E:dpDgvCAHvBk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=nhjMPGb15-E:dpDgvCAHvBk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=nhjMPGb15-E:dpDgvCAHvBk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=nhjMPGb15-E:dpDgvCAHvBk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Total primary goal , to create a tool with a different environment of the software available for more enjoyable to follow site information is complete and current version of growth and achieve sufficient as a tool for the complete facility Find and follow RSS feeds will , give your loved ones will be . The [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/rss-reader-for-flashbanneronline-blog/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><enclosure url="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/IFLashLord_RSS_Reader_en_v1.1.exe" length="592145" type="application/x-msdownload" /><media:content url="http://blog.flashbanneronline.com/wp-content/uploads/2011/04/IFLashLord_RSS_Reader_en_v1.1.exe" fileSize="592145" type="application/x-msdownload" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>Total primary goal , to create a tool with a different environment of the software available for more enjoyable to follow site information is complete and current version of growth and achieve sufficient as a tool for the complete facility Find and follow</itunes:subtitle><itunes:summary>Total primary goal , to create a tool with a different environment of the software available for more enjoyable to follow site information is complete and current version of growth and achieve sufficient as a tool for the complete facility Find and follow RSS feeds will , give your loved ones will be . The [...]</itunes:summary><itunes:keywords>Adobe AIR, Flash, Free Downloads, Air, Banner, Blog, blog.flashbanneronline.com, flashbanneronline, headlines, Reader, RSS, tot</itunes:keywords></item><item><title>Flash Optimization – Reusing Objects</title><link>http://blog.flashbanneronline.com/2011/04/flash-optimization-reusing-objects/</link><category>ActionScript</category><category>Adobe AIR</category><category>Flash</category><category>Tutorials</category><category>actionscript</category><category>AS3</category><category>Bitmap</category><category>BitmapData</category><category>fillRect</category><category>height</category><category>loop</category><category>Math.round</category><category>memory</category><category>memory flash banner</category><category>Objects</category><category>Optimization</category><category>Reusing</category><category>width</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Behrouz Pooladrag</dc:creator><pubDate>Sat, 09 Apr 2011 01:26:13 PDT</pubDate><guid isPermaLink="false">http://blog.flashbanneronline.com/?p=503</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/BnlqvbDeh8LrdOiZ6LNJq7_7uEU/0/da"><img src="http://feedads.g.doubleclick.net/~a/BnlqvbDeh8LrdOiZ6LNJq7_7uEU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BnlqvbDeh8LrdOiZ6LNJq7_7uEU/1/da"><img src="http://feedads.g.doubleclick.net/~a/BnlqvbDeh8LrdOiZ6LNJq7_7uEU/1/di" border="0" ismap="true"></img></a></p><p>Flash optimization is becoming increasing important &amp; with   alternative development tools that developers can use. We all have a   responsibility to build Flash elements that are efficient as much as   they are groundbreaking. As someone who feels responsible for the future   of this great application, I am creating a Flash Optimization series   that will help educate the Flash development community on how to keep   their Flash elements as lean as possible.</p>
<p><strong>Another simple way to optimize memory is to reuse objects and avoid recreating them whenever possible.</strong><br />
For example, in a loop, <strong>do not use the following code</strong>:</p>
<pre class="brush: as3; title: ; notranslate">

const MAX_NUM:int = 18;
 const COLOR:uint = 0xCCCCCC;

var area:Rectangle;

for (var:int = 0; i &lt; MAX_NUM; i++)
 {
 // Do not use the following code
 area = new Rectangle(i,0,1,10);
 myBitmapData.fillRect(area,COLOR);
 }
</pre>
<p><strong>Recreating the Rectangle object in each loop iteration uses more memory and is slower because a new object is created<br />
in each iteration</strong>. <strong>Use the following approach</strong>:</p>
<pre class="brush: as3; title: ; notranslate">

const MAX_NUM:int = 18;
 const COLOR:uint = 0xCCCCCC;

// Create the rectangle outside the loop
 var area:Rectangle = new Rectangle(0,0,1,10);

for (var:int = 0; i &lt; MAX_NUM; i++)
 {
 area.x = i;
 myBitmapData.fillRect(area,COLOR);
 }
</pre>
<p>The previous example used an object with a relatively small memory impact. The next example demonstrates larger<br />
memory savings by reusing a BitmapData object. <strong>The following code to create a tiling effect wastes memory: </strong></p>
<pre class="brush: as3; title: ; notranslate">

var myImage:BitmapData;
 var myContainer:Bitmap;
 const MAX_NUM:int = 300;

for (var i:int = 0; i&lt; MAX_NUM; i++)
 {

// Create a 20 x 20 pixel bitmap, non-transparent
 myImage = new BitmapData(20,20,false,0xF0D062);

// Create a container for each BitmapData instance
 myContainer = new Bitmap(myImage);

// Add it to the display list
 addChild(myContainer);

// Place each container
 myContainer.x = (myContainer.width + 8 ) * Math.round(i % 20);
myContainer.y = (myContainer.height + 8 ) * int(i / 20);
 }
</pre>
<p>An optimized version creates a single BitmapData instance referenced by multiple Bitmap instances and produces the same result:</p>
<pre class="brush: as3; title: ; notranslate">

// Create a single 20 x 20 pixel bitmap, non-transparent
 var myImage:BitmapData = new BitmapData(20,20,false,0xF0D062);
 var myContainer:Bitmap;
 const MAX_NUM:int = 300;

for (var i:int = 0; i&lt; MAX_NUM; i++)
 {
 // Create a container referencing the BitmapData instance
 myContainer = new Bitmap(myImage);

// Add it to the display list
 addChild(myContainer);

// Place each container
 myContainer.x = (myContainer.width + 8 ) * Math.round(i % 20);
myContainer.y = (myContainer.height + 8 ) * int(i / 20);
 }
</pre>
<p><strong>This approach saves about 700 KB in memory, which is a significant savings on a traditional mobile device</strong>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=LW4XnjvbDug:QWagsU88DN8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=LW4XnjvbDug:QWagsU88DN8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=LW4XnjvbDug:QWagsU88DN8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=LW4XnjvbDug:QWagsU88DN8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=LW4XnjvbDug:QWagsU88DN8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=LW4XnjvbDug:QWagsU88DN8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=LW4XnjvbDug:QWagsU88DN8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=LW4XnjvbDug:QWagsU88DN8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?i=LW4XnjvbDug:QWagsU88DN8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashbanneronlineblog?a=LW4XnjvbDug:QWagsU88DN8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashbanneronlineblog?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded><description>Flash optimization is becoming increasing important &amp;#38; with alternative development tools that developers can use. We all have a responsibility to build Flash elements that are efficient as much as they are groundbreaking. As someone who feels responsible for the future of this great application, I am creating a Flash Optimization series that will help [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashbanneronline.com/2011/04/flash-optimization-reusing-objects/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments></item><media:rating>nonadult</media:rating></channel></rss>

