<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1875256007567137949</id><updated>2011-11-27T16:04:52.700-08:00</updated><category term='Ratio between two colors'/><category term='Bank Passbook'/><category term='ColorPicker'/><category term='Right Triangle'/><category term='game math'/><category term='Ration Card'/><category term='Nearest Decimal Place'/><category term='Round Decimal Places'/><category term='AS3 Naming Conventions'/><category term='Bitwise Operations in C'/><category term='Puzzle Game'/><category term='அமார்த்திய சென்'/><category term='Numeric Puzzle Game'/><category term='ActionScript Techniques'/><category term='Math'/><category term='AS3 OOPS Naming Convention'/><category term='Distance Formula'/><category term='rotating objects with AS3'/><category term='action script'/><category term='Angle'/><category term='graphics.moveTo'/><category term='bitwise operator'/><category term='as3 math'/><category term='Math.round()'/><category term='face movieclip to mouse'/><category term='Passport'/><category term='ActionScript 3.0'/><category term='Bitwise Gems'/><category term='Bitwise Operators'/><category term='AS3.0'/><category term='Game AS3.0'/><category term='MovieClip rotation'/><category term='graphics.beginFill'/><category term='AS3 OOP'/><category term='Naming Conventions'/><category term='Missing'/><category term='rotating movie clips with actionscript 2'/><category term='Dynamic Change Text Color in Flash'/><category term='actionscript'/><category term='ColorPicker Gradient'/><category term='Rotate MovieClips toward Mouse'/><category term='ActionScript 2.0'/><category term='தொடக்கப் பள்ளி'/><category term='graphics.lineTo'/><category term='flash math'/><category term='AS2.0'/><category term='Trignomentry'/><category term='Driving Licence'/><title type='text'>lineScript</title><subtitle type='html'>Cross the line..</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-8820683701882632321</id><published>2010-06-03T23:51:00.000-07:00</published><updated>2010-06-04T00:04:50.714-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Right Triangle'/><category scheme='http://www.blogger.com/atom/ns#' term='Angle'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='action script'/><category scheme='http://www.blogger.com/atom/ns#' term='Distance Formula'/><category scheme='http://www.blogger.com/atom/ns#' term='Trignomentry'/><title type='text'>Phythagorean Theorem - Distance Formula</title><content type='html'>Sum of the Squares of the two legs of a right triangle is equal to the square of the hypotenuse.&lt;br /&gt;&lt;br /&gt;A^2 + B^2 = C^2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var dist:Number;&lt;br /&gt;var circle:Circle;&lt;br /&gt;&lt;br /&gt;function onStageEnter(event) {&lt;br /&gt;var dx:Number = event.target.x - mouseX;&lt;br /&gt;var dy:Number = event.target.y - mouseY;&lt;br /&gt;dist = Math.sqrt(dx*dx + dy*dy);&lt;br /&gt;event.target.alpha = 1-(dist/250);&lt;br /&gt;distText.text = String(dist);&lt;br /&gt;distText.x = mouseX;&lt;br /&gt;distText.y = mouseY+20;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;for (var i:int = 1; i&amp;lt;=7; i++) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;for (var j:int = 1; j&amp;lt;=5; j++) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;circle = new Circle();&lt;br /&gt;&amp;nbsp;&amp;nbsp;circle.x = (i*circle.width)-circle.width;&lt;br /&gt;&amp;nbsp;&amp;nbsp;circle.y = (j*circle.height)-circle.height;&lt;br /&gt;&amp;nbsp;&amp;nbsp;circle.addEventListener(Event.ENTER_FRAME, onStageEnter);&lt;br /&gt;&amp;nbsp;&amp;nbsp;addChild(circle);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed allowfullscreen="true" allowscriptaccess="always" height="400" src="http://www.4shared.com/embed/306411588/503c65fd/preview.swf" width="550"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-8820683701882632321?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/8820683701882632321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/06/phythagorean-theorem-distance-formula.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/8820683701882632321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/8820683701882632321'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/06/phythagorean-theorem-distance-formula.html' title='Phythagorean Theorem - Distance Formula'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-7469493863777541815</id><published>2010-05-28T03:46:00.000-07:00</published><updated>2010-05-28T03:46:07.092-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='face movieclip to mouse'/><category scheme='http://www.blogger.com/atom/ns#' term='rotating movie clips with actionscript 2'/><category scheme='http://www.blogger.com/atom/ns#' term='MovieClip rotation'/><category scheme='http://www.blogger.com/atom/ns#' term='Math'/><category scheme='http://www.blogger.com/atom/ns#' term='Rotate MovieClips toward Mouse'/><category scheme='http://www.blogger.com/atom/ns#' term='game math'/><category scheme='http://www.blogger.com/atom/ns#' term='flash math'/><category scheme='http://www.blogger.com/atom/ns#' term='as3 math'/><category scheme='http://www.blogger.com/atom/ns#' term='rotating objects with AS3'/><title type='text'>Math - Rotate MovieClip to towards Mouse</title><content type='html'>&lt;embed src="http://www.4shared.com/embed/300923782/818acc32/preview.swf" width="300" height="300" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-7469493863777541815?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/7469493863777541815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/05/math-rotate-movieclip-to-towards-mouse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/7469493863777541815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/7469493863777541815'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/05/math-rotate-movieclip-to-towards-mouse.html' title='Math - Rotate MovieClip to towards Mouse'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-424340212377572332</id><published>2010-04-27T00:20:00.000-07:00</published><updated>2010-04-28T02:43:21.566-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Game AS3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Numeric Puzzle Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Puzzle Game'/><title type='text'>Numeric Puzzle Game !</title><content type='html'>You have a surprise at the end of the game !!&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://www.4shared.com/embed/275700303/24a47173/preview.swf" width="460" height="470" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-424340212377572332?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/424340212377572332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/04/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/424340212377572332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/424340212377572332'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/04/blog-post.html' title='Numeric Puzzle Game !'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-36073957383775147</id><published>2010-03-09T02:38:00.000-08:00</published><updated>2010-03-09T02:56:49.981-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='graphics.beginFill'/><category scheme='http://www.blogger.com/atom/ns#' term='ColorPicker Gradient'/><category scheme='http://www.blogger.com/atom/ns#' term='ColorPicker'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics.lineTo'/><category scheme='http://www.blogger.com/atom/ns#' term='action script'/><category scheme='http://www.blogger.com/atom/ns#' term='Ratio between two colors'/><category scheme='http://www.blogger.com/atom/ns#' term='actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='bitwise operator'/><category scheme='http://www.blogger.com/atom/ns#' term='Bitwise Operators'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics.moveTo'/><title type='text'>Learn Actionscirpt Techniques - ColorPicker Gradient</title><content type='html'>&lt;embed src="http://www.4shared.com/embed/212222529/7106bb0c/preview.swf" width="700" height="200" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;The ColorPicker component displays a list of one or more swatches from which the user can select a color.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;By default, the component displays a single swatch of color on a square button. When the user clicks this button, a panel opens to display the complete list of swatches.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial, helvetica;color:#3333FF;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px; font-size: -webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"    style="font-family:Georgia, serif;font-size:130%;color:#000000;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial, helvetica;color:#3333FF;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px; font-size: -webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"    style="font-family:Georgia, serif;font-size:130%;color:#000000;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, helvetica; font-size: 13px; color: rgb(51, 51, 51); line-height: 20px; "&gt;// Here is the Source Code&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial, helvetica;color:#3333FF;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px; font-size: -webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"    style="font-family:Georgia, serif;font-size:130%;color:#000000;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial, helvetica;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px; font-size: -webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"   style="font-family:Georgia, serif;font-size:130%;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, helvetica; font-size: 13px; line-height: 20px; "&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var startHex;&lt;br /&gt;var endHex;&lt;br /&gt;var spacing:int = 25;&lt;br /&gt;var noOfBoxes:int = 13;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial, helvetica;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px; font-size: -webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"   style="font-family:Georgia, serif;font-size:130%;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, helvetica; font-size: 13px; line-height: 20px; "&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;function fadeHex(ratio) {&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var r = startHex &gt;&gt; 16;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var g = startHex &gt;&gt; 8 &amp;amp; 0xFF;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var b = startHex &amp;amp; 0xFF;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;r += ((endHex &gt;&gt; 16 &amp;amp; 0xFF)-r)*ratio;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;g += ((endHex &gt;&gt; 8 &amp;amp; 0xFF)-g)*ratio;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;b += ((endHex &amp;amp; 0xFF)-b)*ratio;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;return (r &lt;&lt; 16 | g &lt;&lt; 8 | b);&lt;br /&gt;}&lt;br /&gt;function drawSquare(x, y, color) {&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;graphics.beginFill(color);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;graphics.moveTo(x,y);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;graphics.lineTo(x+50,y);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;graphics.lineTo(x+50,y+50);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;graphics.lineTo(x,y+50);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;graphics.lineTo(x,y);&lt;br /&gt;}&lt;br /&gt;function colorChange(e:Event) {&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var cp:ColorPicker = e.target as ColorPicker;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;if (cp==cp1) {&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;startHex = "0x"+e.target.hexValue ;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;} else {&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;endHex = "0x"+e.target.hexValue;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;for (var i = 0; i&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var ratio = i/noOfBoxes;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var xx = spacing+(i*50);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var yy = 70;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;var nowColor = fadeHex(ratio);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;drawSquare(xx,yy,nowColor);&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#330099;"&gt;}&lt;br /&gt;}&lt;br /&gt;cp1.selectedColor = 0x990000;&lt;br /&gt;cp2.selectedColor = 0x000000;&lt;br /&gt;cp1.addEventListener(Event.CHANGE, colorChange);&lt;br /&gt;cp2.addEventListener(Event.CHANGE, colorChange);&lt;br /&gt;cp1.addEventListener(Event.RENDER, colorChange);&lt;br /&gt;cp2.addEventListener(Event.RENDER, colorChange);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial, helvetica;color:#3333FF;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px; font-size: -webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"    style="font-family:Georgia, serif;font-size:130%;color:#000000;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, helvetica; font-size: 13px; color: rgb(51, 51, 51); line-height: 20px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-36073957383775147?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/36073957383775147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/03/learn-actionscirpt-techniques.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/36073957383775147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/36073957383775147'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/03/learn-actionscirpt-techniques.html' title='Learn Actionscirpt Techniques - ColorPicker Gradient'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-6419631549325664072</id><published>2010-03-08T03:15:00.000-08:00</published><updated>2010-03-08T03:40:33.155-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS3 OOPS Naming Convention'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 Naming Conventions'/><category scheme='http://www.blogger.com/atom/ns#' term='Naming Conventions'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3 OOP'/><title type='text'>AS3 Naming Conventions</title><content type='html'>&lt;span&gt;Use precise, meaningful, contextually relevant names that are as descriptive as possible. Limit the use of unnecessary abbreviations&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Example: defaultImagePreview&lt;br /&gt;NOT: dfltImgPrv&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Start each instance name with a lowercase letter, and intercap the remaining words.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Examples: menuItem, sectionTitle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Apply the same conventions to variable names.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Examples: accountNumber, startingPoint, currentProductName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Begin a class name with an uppercase letter. Write class names in mixed case when it’s a compound or concatenated word. Keep package names as short as possible, using reverse domain naming conventions.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Examples: com.client.project.component.ClassName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Name functions and methods in the form of verbs, since they perform actions.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Examples: getUserName(), calculateTaxes(), createSubMenu()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Name booleans with an appropriate, positive prefix, such as “is”, “has”, “can”, or “should”, for an easier determination between true and false.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Examples: isSoundOn, isFinished, isOpen, isLoggedIn, hasLicense, canEvaluate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use complement names for complement entities: get/set, add/remove, create/destroy, start/stop, insert/delete, increment/decrement, old/new, begin/end, first/last, up/down, min/max, next/previous, open/close, show/hide.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Examples: getUserName, setUserName&lt;br /&gt;addThumbnailImage, removeThumbnailImage&lt;br /&gt;showAnimation, hideAnimation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Private variable names may be prefixed with an underscore or $ symbol as long as consistency is maintained.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-6419631549325664072?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/6419631549325664072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/03/as3-basics-of-naming-conventions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6419631549325664072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6419631549325664072'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/03/as3-basics-of-naming-conventions.html' title='AS3 Naming Conventions'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-6695968220933037839</id><published>2010-02-15T08:20:00.000-08:00</published><updated>2010-02-21T09:06:19.657-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Dynamic Change Text Color in Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript Techniques'/><category scheme='http://www.blogger.com/atom/ns#' term='AS2.0'/><title type='text'>Learn Actionscript Techniques - Change Text Color in Runtime</title><content type='html'>&lt;embed src="http://www.4shared.com/embed/212076979/f210f01/preview.swf" width="300" height="200" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;import flash.text.TextFormat;&lt;br /&gt;&lt;br /&gt;var format:TextFormat = new TextFormat();&lt;br /&gt;var r:Number = 0x000000;&lt;br /&gt;var g:Number = 0x000000;&lt;br /&gt;var b:Number = 0x000000;&lt;br /&gt;var red:Number; &lt;br /&gt;var green:Number;&lt;br /&gt;var blue:Number;&lt;br /&gt;&lt;br /&gt;addEventListener(Event.ENTER_FRAME,changeColor);&lt;br /&gt;&lt;br /&gt;function changeColor(evt:Event) {&lt;br /&gt;red = 127*(1+Math.cos(r += .03));&lt;br /&gt;green = 127*(1+Math.cos(g += .06));&lt;br /&gt;blue = 127*(1+Math.cos(b += .02));&lt;br /&gt;var myColor = red &lt;&lt; 16 | green &lt;&lt; 8 | blue;&lt;br /&gt;format.color = myColor;&lt;br /&gt;colorText.setTextFormat(format); &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-6695968220933037839?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/6695968220933037839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/02/learn-actionscirpt-techniques-change.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6695968220933037839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6695968220933037839'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/02/learn-actionscirpt-techniques-change.html' title='Learn Actionscript Techniques - Change Text Color in Runtime'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-5088268464623334266</id><published>2010-02-15T08:17:00.000-08:00</published><updated>2010-02-15T08:19:21.702-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Bitwise Operations in C'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript Techniques'/><category scheme='http://www.blogger.com/atom/ns#' term='AS2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Bitwise Gems'/><category scheme='http://www.blogger.com/atom/ns#' term='Bitwise Operators'/><title type='text'>Bitwise Operation in Flash</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Verdana, Geneva, sans-serif; font-size: 12px; color: rgb(102, 102, 102); line-height: 20px; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large; "&gt;&lt;span class="Apple-style-span" style="color: rgb(204, 0, 0); "&gt;Bitwise gems - fast integer math&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Bitwise operators are very fast in AS3, so here is a small collection of code snippets which can speed up certain computations. I won’t explain what bit operators are and how to use them, rather pointing to an excellent article hosted on gamedev.net: &lt;a href="http://www.gamedev.net/reference/articles/article1563.asp" style="color: rgb(102, 102, 102); text-decoration: underline; "&gt;‘Bitwise Operations in C’&lt;/a&gt;.&lt;br /&gt;If you know any good tricks that are not included here, feel free to leave a comment or send me an email. All benchmarks were done in AS3.&lt;/p&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Left bit shifting to multiply by any power of two&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Approximately 300% faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;*&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;2&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;*&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;64&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;6&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Right bit shifting to divide by any power of two&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Approximately 350% faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;2&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;/&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;64&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;6&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="Apple-style-span" style="white-space: normal; font-weight: bold; font-family: Georgia, serif; font-size: 16px; "&gt;Number to integer conversion&lt;/span&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Using int(x) is 10% faster in AS3. Still the bitwise version works better in AS2.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;int&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="lit"&gt;232&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="lit"&gt;232&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Extracting color components&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Not really a trick, but the regular way of extracting values using bit masking and shifting.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="com"&gt;//24bit&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; color&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x336699&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; r&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;16&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; g&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;8&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xFF&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xFF&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//32bit&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; color&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xff336699&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; a&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;24&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; r&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;16&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xFF&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; g&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;span class="lit"&gt;8&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xFF&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; color &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xFF&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Combining color components&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;‘Shift up’ the values into the correct position and combine them.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="com"&gt;//24bit&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; r&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x33&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; g&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x66&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x99&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; color&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; r &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;16&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; g &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;8&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//32bit&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; a&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0xff&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; r&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x33&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; g&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x66&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0x99&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;/span&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; color&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;uint&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; a &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;24&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; r &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;16&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; g &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;8&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Swap integers without a temporary variable using XOR&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Pretty neat trick, it is explained in detail in the link at the top of the page. This is 20% faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="kwd"&gt;var&lt;/span&gt;&lt;span class="pln"&gt; t&lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="kwd"&gt;int&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; a&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; a &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; b &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; t&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;a &lt;/span&gt;&lt;span class="pun"&gt;^=&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;b &lt;/span&gt;&lt;span class="pun"&gt;^=&lt;/span&gt;&lt;span class="pln"&gt; a&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;a &lt;/span&gt;&lt;span class="pun"&gt;^=&lt;/span&gt;&lt;span class="pln"&gt; b&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Increment/decrement&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;This is much slower than the pre/post decrement operator, but a nice way to obfuscate your code.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;-~&lt;/span&gt;&lt;span class="pln"&gt;i&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;// i++&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;~-&lt;/span&gt;&lt;span class="pln"&gt;i&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;// i--&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Sign flipping using NOT or XOR&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Strangely enough, this is 300%(!) faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;i&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;~&lt;/span&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;+&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//or&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;^&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;+&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Fast modulo operation using bitwise AND&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;If the divisor is a power of 2, the modulo (%) operation can be done with:&lt;br /&gt;modulus = numerator &amp;amp; (divisor - 1);&lt;br /&gt;This is about 600% faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;131&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;%&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;4&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;131&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="lit"&gt;4&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Check if an integer is even/uneven using bitwise AND&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;This is 600% faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;isEven &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;%&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;2&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;==&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;isEven &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;&amp;amp;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;1&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;==&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Absolute value&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;Forget Math.abs() for time critical code. Version 1 is 2500% faster than Math.abs(), and the funky bitwise version 2 is again 20% faster than version 1.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="com"&gt;//version 1&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; x &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;?&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;:&lt;/span&gt;&lt;span class="pln"&gt; x&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//version 2&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;i &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;^&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;31&lt;/span&gt;&lt;span class="pun"&gt;))&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;-&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;x &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;31&lt;/span&gt;&lt;span class="pun"&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Comparing two integers for equal sign&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; "&gt;This is 35% faster.&lt;/p&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;eqSign &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; a &lt;/span&gt;&lt;span class="pun"&gt;*&lt;/span&gt;&lt;span class="pln"&gt; b &lt;/span&gt;&lt;span class="pun"&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;span class="pln"&gt;  &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;&lt;/span&gt;&lt;span class="com"&gt;//equals:&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;eqSign &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; a &lt;/span&gt;&lt;span class="pun"&gt;^&lt;/span&gt;&lt;span class="pln"&gt; b &lt;/span&gt;&lt;span class="pun"&gt;&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;0&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Fast color conversion from R5G5B5 to R8G8B8 pixel format using shifts&lt;/h4&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pln"&gt;R8 &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R5 &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;3&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R5 &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;2&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; G8 &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R5 &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;3&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R5 &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;2&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; B8 &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R5 &lt;/span&gt;&lt;span class="pun"&gt;&lt;&lt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;3&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;|&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;R5 &lt;/span&gt;&lt;span class="pun"&gt;&gt;&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="lit"&gt;2&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;span class="pun"&gt;--&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-5088268464623334266?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/5088268464623334266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/02/bitwise-operation-in-flash.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/5088268464623334266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/5088268464623334266'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/02/bitwise-operation-in-flash.html' title='Bitwise Operation in Flash'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-8086647286855260970</id><published>2010-01-07T07:57:00.000-08:00</published><updated>2010-01-07T08:01:15.272-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Missing'/><category scheme='http://www.blogger.com/atom/ns#' term='Ration Card'/><category scheme='http://www.blogger.com/atom/ns#' term='Driving Licence'/><category scheme='http://www.blogger.com/atom/ns#' term='Passport'/><category scheme='http://www.blogger.com/atom/ns#' term='Bank Passbook'/><title type='text'>Missing Passport - Small Idea Small Blog</title><content type='html'>If you find any important document like Driving Licence, Ration Card, Passport, Bank Passbook Etc., missed by someone, simply put them into near by any POSTBOXES. They'll automatically reach the owner, and fine will be collected from them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-8086647286855260970?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/8086647286855260970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/01/missing-passport-small-idea-small-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/8086647286855260970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/8086647286855260970'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/01/missing-passport-small-idea-small-blog.html' title='Missing Passport - Small Idea Small Blog'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-6526093030658721775</id><published>2010-01-05T04:11:00.000-08:00</published><updated>2010-01-06T05:00:39.983-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Math.round()'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='AS3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Round Decimal Places'/><category scheme='http://www.blogger.com/atom/ns#' term='Nearest Decimal Place'/><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript Techniques'/><category scheme='http://www.blogger.com/atom/ns#' term='AS2.0'/><title type='text'>Learn Flash ActionScript Techniques - Round Nearest Decimal Place</title><content type='html'>There are numerous reasons to round numbers. For example, when displaying the results of a calculation, you might display only the intended precision.Because all arithmetic in ActionScript performed with floating-point numbers, some calculations result in unexpected floating-point numbers that must be rounded.For example, the result of a calculation may be 3.99999999 in practice, even though it should be 4.0 in theory.&lt;br /&gt;&lt;br /&gt;The Math.round() method returns the nearest integer value of any parameter passed to it&lt;br /&gt;&lt;br /&gt;trace(Math.round(29.577));  // Displays: 29&lt;br /&gt;trace(Math.round(189.697)); // Displays: 189&lt;br /&gt;&lt;br /&gt;The Math.floor() method rounds down, and the Math.ceil() rounds up:&lt;br /&gt;&lt;br /&gt;trace(Math.floor(204.99));  // Displays: 204&lt;br /&gt;trace(Math.floor(401.01));  // Displays: 401&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To round a number to the nearest decimal place:&lt;br /&gt;&lt;br /&gt;1. Decide the number of decimal places to which you want the number rounded. For example, if you want to round 90.337 to 90.34 then you want to round to two decimal places, which means you want to round to the nearest .01.&lt;br /&gt;&lt;br /&gt;2. Divide the input value by the number chosen in Step 1 (in this case, .01).&lt;br /&gt;&lt;br /&gt;3. Use Math.round() to round the calculated value from Step 2 to the nearest integer.&lt;br /&gt;&lt;br /&gt;4. Multiple the result of Step 3 by the same value that you used to divide in Step 2.&lt;br /&gt;&lt;br /&gt;For example, to round 90.337 to two decimal places, you could use:&lt;br /&gt;&lt;br /&gt; trace(Math.round(90.337 / .01) * .01); // Displays: 9.34&lt;br /&gt;&lt;br /&gt;You can use the identical math to round a number to the nearest multiple of an integer.&lt;br /&gt;&lt;br /&gt;For example, this rounds 92.5 to the nearest multiple of 5:&lt;br /&gt;&lt;br /&gt;trace(Math.round(92.5 / 5) * 5); // Displays: 95&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-6526093030658721775?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/6526093030658721775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/01/learn-flash-as3-techniques-round.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6526093030658721775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6526093030658721775'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/01/learn-flash-as3-techniques-round.html' title='Learn Flash ActionScript Techniques - Round Nearest Decimal Place'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-6607274344176558510</id><published>2010-01-02T05:02:00.000-08:00</published><updated>2010-01-07T04:06:42.464-08:00</updated><title type='text'>New Year Celebration 2010</title><content type='html'>&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;      &lt;/span&gt;Lot of Excitement with my team members (C2 Workshop Pvt Ltd)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9OOVGLeoI/AAAAAAAAADs/yGfHi-nwDyc/s1600-h/DSCN3892.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9OOVGLeoI/AAAAAAAAADs/yGfHi-nwDyc/s320/DSCN3892.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422138484465564290" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_EkkGTeysTAI/Sz9N_5Q7R8I/AAAAAAAAADk/eY3LQuDirKI/s1600-h/DSCN3966.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_EkkGTeysTAI/Sz9N_5Q7R8I/AAAAAAAAADk/eY3LQuDirKI/s320/DSCN3966.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422138236476278722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9Nkf7A3II/AAAAAAAAADc/JVoDPOhZfeQ/s1600-h/DSCN3959.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9Nkf7A3II/AAAAAAAAADc/JVoDPOhZfeQ/s320/DSCN3959.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422137765817015426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9NYZswGWI/AAAAAAAAADU/Z7acmLLlLhU/s1600-h/DSCN3934.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9NYZswGWI/AAAAAAAAADU/Z7acmLLlLhU/s320/DSCN3934.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422137557988153698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9M7J7UoJI/AAAAAAAAADM/5p1z0UnLIys/s1600-h/DSCN3906.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9M7J7UoJI/AAAAAAAAADM/5p1z0UnLIys/s320/DSCN3906.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422137055538094226" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9KsKtY2FI/AAAAAAAAADE/Qz22p29RMAE/s1600-h/DSCN3939.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9KsKtY2FI/AAAAAAAAADE/Qz22p29RMAE/s320/DSCN3939.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422134599026792530" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9KT_cVVZI/AAAAAAAAAC8/2q_NEEEJqKU/s1600-h/DSCN3937.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9KT_cVVZI/AAAAAAAAAC8/2q_NEEEJqKU/s320/DSCN3937.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422134183685608850" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_EkkGTeysTAI/Sz9JzZtVZ2I/AAAAAAAAAC0/9OTHyibzyHs/s1600-h/DSCN3934.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_EkkGTeysTAI/Sz9JzZtVZ2I/AAAAAAAAAC0/9OTHyibzyHs/s320/DSCN3934.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422133623800555362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_EkkGTeysTAI/Sz9JaBLrgmI/AAAAAAAAACs/bBvCvScXi3E/s1600-h/DSCN3933.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_EkkGTeysTAI/Sz9JaBLrgmI/AAAAAAAAACs/bBvCvScXi3E/s320/DSCN3933.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422133187720217186" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9JBiFnYYI/AAAAAAAAACk/PL-y5LLG66w/s1600-h/DSCN3927.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9JBiFnYYI/AAAAAAAAACk/PL-y5LLG66w/s320/DSCN3927.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422132767056421250" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9IiLsceRI/AAAAAAAAACc/5PPvKflQoUs/s1600-h/DSCN3926.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9IiLsceRI/AAAAAAAAACc/5PPvKflQoUs/s320/DSCN3926.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422132228469324050" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;     &lt;/span&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9H46LCoTI/AAAAAAAAACU/1Z8oyHtLy54/s1600-h/DSCN3923.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_EkkGTeysTAI/Sz9H46LCoTI/AAAAAAAAACU/1Z8oyHtLy54/s320/DSCN3923.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422131519391179058" /&gt;&lt;/a&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre; "&gt;      &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_EkkGTeysTAI/Sz9GVNhS11I/AAAAAAAAACM/EGzDDzBqLTo/s1600-h/DSCN3915.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_EkkGTeysTAI/Sz9GVNhS11I/AAAAAAAAACM/EGzDDzBqLTo/s320/DSCN3915.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5422129806597871442" /&gt;&lt;/a&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-6607274344176558510?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/6607274344176558510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2010/01/new-year-celebration-2010.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6607274344176558510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/6607274344176558510'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2010/01/new-year-celebration-2010.html' title='New Year Celebration 2010'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_EkkGTeysTAI/Sz9OOVGLeoI/AAAAAAAAADs/yGfHi-nwDyc/s72-c/DSCN3892.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1875256007567137949.post-4100361672241089632</id><published>2009-12-29T03:43:00.000-08:00</published><updated>2010-01-07T04:04:23.606-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='அமார்த்திய சென்'/><category scheme='http://www.blogger.com/atom/ns#' term='தொடக்கப் பள்ளி'/><title type='text'>ஐந்தில் மகிழாதது...</title><content type='html'>&lt;span class="Apple-style-span"   style="font-family:'Times New Roman';font-size:100%;"&gt;&lt;span class="Apple-style-span"  style=" line-height: 18px;font-size:12px;"&gt;தமிழ்நாட்டில் செயல்வழிக் கல்வி தொடங்கப்பட்டபோது சில ஆசிரியர் சங்கங்கள் மத்தியில் முணுமுணுப்பு ஏற்பட்டாலும்,​​ "தொடக்கப்பள்ளி பாடத்திட்டத்தை மாற்றி அமையுங்கள்,​​ வீட்டுப்பாடங்களை ஒழியுங்கள்' என்று நோபல் பரிசு பெற்ற பொருளாதார அறிஞர் அமார்த்திய சென் இப்போது கூறியுள்ள கருத்தைப் பார்க்கும்போது,​​ செயல்வழிக் கல்வி நன்மை பயக்கும் என்பதை உறுதிப்படுத்துகிறது.&lt;p&gt;&lt;/p&gt;அமார்த்திய சென் ஏதோ போகிற போக்கில் இந்த கருத்தைச் சொல்லிவிட்டுப் போகவில்லை.​ அவர் தனக்குக் கிடைத்த நோபல் பரிசுத் தொகையில் ஒரு பகுதியைக் கொண்டு நிறுவிய கிழக்கு அறக்கட்டளை ​(இந்தியா)​ என்ற அமைப்பு,​​ ​ மேற்கு வங்க மாநிலத்தில் 6 மாவட்டங்களில் உள்ள தொடக்கப் பள்ளிகளை 2001-02ம் ஆண்டு ஆய்வுக்கு எடுத்துகொண்டு தொடர்ச்சியாக கண்காணித்த பின்னர் வெளியிட்ட அறிக்கையை வைத்துதான் அவர் கூறியிருக்கிறார்.&lt;p&gt;&lt;/p&gt;தொடக்கப் பள்ளிக் குழந்தைகளை வீட்டுப் பாடங்கள் செய்யும்படி சொல்லும்போது,​​ அக்குழந்தைகள் தங்கள் குழந்தைப் பருவத்துக்கு உரித்தான விளையாட்டு,​​ மகிழ்ச்சிகளை இழந்துவிடுகிறார்கள் என்பது மட்டுமல்ல,​​ சமூகத்தில் ஏற்கெனவே நடைமுறையில் உள்ள சமூக,​​ பொருளாதார ஏற்றத் தாழ்வுகளும் சேர்ந்துகொள்கின்றன.​ வசதி படைத்தவர்களும் சமூகத்தில் உயர்நிலையில் உள்ளவர்களும் தங்கள் குழந்தைகளை தனிவகுப்புகளுக்கு ​(டியூஷன்)​ அனுப்புகின்றனர்.​ இது அவர்களின் கல்வித் தரத்திலும் பிரதிபலிக்கிறது.&lt;p&gt;&lt;/p&gt;இந்த ஆய்வுகளின்படி,​​ தொடக்கப்பள்ளியில் 3 மற்றும் 4ம் வகுப்பு படிக்கும் சிறார்களில் தாழ்த்தப்பட்ட வகுப்பைச் சேர்ந்த 29 சதவீத குழந்தைகளால் எழுதப் படிக்க முடியவில்லை.​ முஸ்லிம் குழந்தைகளில் 27 சதவீதம் பேரும்,​​ பொதுப் பிரிவில் 8 சதவீத குழந்தைகளாலும் எழுதப் படிக்க முடியவில்லை.​ இதற்கு ​ தொடக்கப் பள்ளி பாடத்திட்டத்தில் உள்ள கோளாறுகளுடன் குழந்தைகளை வீட்டுப்பாடம் செய்யச் சொல்வதும்தான் என்பதே இந்த ஆய்வின் வெளிப்பாடு.&lt;p&gt;&lt;/p&gt;அமெரிக்கா போன்ற மேலை நாடுகளில் குழந்தைகள் கல்வி கற்கும் முறையே வேறாக இருக்கிறது.​ குழந்தைகளுக்கு 5 வயதுவரை வகுப்புகளில்கூட எழுத பணிக்கப்படுவதில்லை.​ உரையாடல்,​​ விளையாடுதல் இவை மட்டுமே அவர்களின் வகுப்பறையாக இருக்கின்றன.​ குழந்தைகள் அங்கே குழந்தைகளாகவே இருக்கின்றனர்.​ 5 வயதுக்குப் பிறகு,​​ தொடக்கப் பள்ளி வகுப்புகளில் அறிவியல்,​​ ​ ​ மொழி ஆகியவற்றின் அடிப்படை,​​ படித்தல்,​​ எழுதுதல்,​​ ஓவியம் போன்ற குழந்தைகளின் ஆர்வத்துக்கேற்ற நுண்கலை அறிமுகம் என சொல்லித்தரப்படுகிறது.​ பிறகுதான் பாடதிட்டத்தை மிகவும் செறிவானதாக கனமானதாக மாற்றுகின்றனர்.​ ஆனால் இந்த நிலைமை இந்தியாவில் இல்லை.&lt;p&gt;&lt;/p&gt;நர்சரி பள்ளிகள் அறிமுகமாகாத நிலையில்,​​ இந்தியாவிலும் குழந்தைகள் 5 வயது வரை நன்றாக விளையாடினார்கள்.​ வீட்டில் பெரியவர்களிடம் கதை கேட்டார்கள்.​ பேசினார்கள்,​​ சொல்லிக்கொடுத்த வழிபாட்டு பாடல்களையும் கதைகளையும் திருப்பிச் சொன்னார்கள்.​ பிறகுதான் அவர்கள் முதல் வகுப்பில் நேரிடையாக சேர்ந்து பயின்றார்கள்.​ அப்போதும்கூட முதல் வகுப்பு செல்லும் குழந்தையுடன் ஒரு கரும்பலகையும்,​​ தமிழ் மொழிப் புத்தகம் ஒன்றும் கூட்டல் கழித்தலுக்கான வாய்ப்பாடு புத்தகமும் மட்டுமே கையில் இருந்தது.​ மூன்றாம் வகுப்பில்தான் ஆங்கில அரிச்சுவடி கற்றுத்தரப்பட்டது.&lt;p&gt;&lt;/p&gt;இப்போதெல்லாம் பிரி-நர்சரி வகுப்புகள்,​​ கிரீச் என குழந்தைகள் வீட்டில் தங்கவே இல்லாத சூழல்களை இந்திய சமுதாயம் வரிந்து உருவாக்கிக் கொண்டுவிட்டது.​ நர்சரி குழந்தைகளை தங்கள் பிஞ்சு விரல்களைக் கொண்டு ஆங்கிலத்தை எழுதிப் பழக்குகிறார்கள்.​ எண்களை ஆயிரம் வரை எழுதித் தள்ளுகிறார்கள்.​ வீட்டுப் பாடங்களையும் செய்கிறார்கள்.​ புத்தக மூட்டைகளைச் சுமந்து செல்கிறார்கள்.​ தனிவகுப்புகளுக்கும் செல்கிறார்கள்.​ இத்தனைக்குப் பிறகும் அவர்களுக்கு விளையாட,​​ குழந்தைப் பருவத்தை அனுபவிக்க எங்கே நேரம் இருக்க முடியும்!&lt;p&gt;&lt;/p&gt;ஆங்கிலேயர் காலத்தில் முதல் பாரம் முடித்தவர்கள்கூட எழுதுவது பேசுவது படிப்பது மூன்றையும் தவறில்லாமல் செய்ய முடிந்தபோது இன்றைய பிளஸ் 2 மாணவர்கூட தவறில்லாமல் தமிழைக்கூட எழுதவும் முடியாத நிலை உருவானதை நினைக்க வேண்டியிருக்கிறது.&lt;p&gt;&lt;/p&gt;தற்போது சமச்சீர் கல்விக்காக பாடத்திட்டங்கள் தயாரிக்கப்பட்டுவிட்டதாகக் கூறப்படுகிறது.​ அந்த பாடத்திட்டங்கள்,​​ அமார்த்திய சென் குறிப்பிடும் வகையில்,​​ எளிமையானதாகவும் வீட்டுப்பாடங்களுக்குத் தேவை இல்லாத வகையிலும் இருக்கிறதா என்பது தெரியவில்லை.​ ஆனால் இப்போது தமிழகத்தில் அரசு தொடக்கப் பள்ளிகளில் அறிமுகம் செய்யப்பட்டுள்ள செயல்வழிக் கல்விக்கு எந்தக் குந்தகமும் இல்லாமல் பார்த்துக் கொள்ள வேண்டியது அவசியம்.&lt;p&gt;&lt;/p&gt;ஒரு மனிதன் வளர்ந்த பிறகு அசைபோட குழந்தைப் பருவ நினைவுகள் இல்லாவிட்டால்,​​ அவன் சமூகக் குற்றங்கள் செய்யும் வாய்ப்புகள் நேரிடுவதோடு,​​ உணர்வுபூர்வமான சிக்கல்களிலிருந்து மீள்வதில் பெரும் குழப்பத்தையும்,​​ இயலாமையையும் சந்திக்க நேர்கிறது என்பதுதான் உளவியல் கூறும் உண்மை.&lt;p&gt;&lt;/p&gt;"உங்கள் குழந்தைகள் உங்கள் குழந்தைகள் அல்ல,​​ அவர்கள் உங்கள் கனவின் குழந்தைகள்' என்பதற்காக,​​ நம்முடைய நிறைவேறாத வாழ்க்கை லட்சியங்களை அவர்கள் மீது திணிப்பது நியாயமாகாது.​ ஐந்தில் வளையாதது ஐம்பதிலும் வளையாது என்ற பழமொழியை படிப்புக்காக மட்டுமே சொல்லப்பட்டதாக நாம் தவறாகப் புரிந்துகொண்டிருக்கிறோம்.​ ஐந்தில் மகிழ்ச்சியாக இல்லாதது ஐம்பதிலும் மகிழ்ச்சியாக இருக்காது என்றும் புரிந்துகொள்ள வேண்டும்&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1875256007567137949-4100361672241089632?l=linelogesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linelogesh.blogspot.com/feeds/4100361672241089632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linelogesh.blogspot.com/2009/12/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/4100361672241089632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1875256007567137949/posts/default/4100361672241089632'/><link rel='alternate' type='text/html' href='http://linelogesh.blogspot.com/2009/12/blog-post.html' title='ஐந்தில் மகிழாதது...'/><author><name>linelogesh</name><uri>http://www.blogger.com/profile/09225595991063046377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='27' src='http://3.bp.blogspot.com/_EkkGTeysTAI/S5TFxspCYVI/AAAAAAAAAE8/F53c0BKd_Hs/S220/falling-leaves-simulation.JPG'/></author><thr:total>0</thr:total></entry></feed>
