====== ActionScript ====== {{indexmenu>as:#2|js#IndexMenu+ajax}} ===== tips ===== Compiler –optimize=true ==== Array ==== === random === public function shuffle_by_splice(arr:Array):Array { var brr:Array; brr = new Array(); while (arr.length>0) { brr.push(arr.splice(Math.floor(Math.random()*arr.length),1)[0]); } return brr; } ==== Heredoc on AS3 ==== private var myString:String = ( ).toString(); === .mxml === ==== bitwise ==== **Left bit shifting << multiplicando potência de 2** 300% faster! xDD x = x * 2; x = x * 64; x = x << 1; x = x << 6; **Right bit shifting >> dividindo potência de 2** 350% faster x = x / 2; x = x / 64; x = x >> 1; x = x >> 6; ===== index ===== {{indexmenu>code:as3#2|js#IndexMenu+ajax}} ====== source(s) ====== [[http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/]] [[http://www.gamedev.net/reference/articles/article1563.asp]] [[http://lab.polygonal.de/]]