Skip to content

Instantly share code, notes, and snippets.

@pifantastic
Created February 10, 2010 05:23
Show Gist options
  • Save pifantastic/300058 to your computer and use it in GitHub Desktop.
Save pifantastic/300058 to your computer and use it in GitHub Desktop.
function packVXxx(n:int):String {
var binaryString:String = new String;
binaryString += String.fromCharCode(n & 0x000000ff);
binaryString += String.fromCharCode((n >> 8) & 0x000000ff);
binaryString .= String.fromCharCode((n >> 16) & 0x000000ff);
return binaryString += String.fromCharCode(0) + String.fromCharCode(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment