Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

binarygetValue.as

1
2
3
4
5
6
7
8
9
10
11
// attrib is for first element, 1 for second etc

getValue = function(attrib, flag){
	attrib = Math.pow(2,attrib);
	return ((attrib & flag) == attrib);
}

flag = "10011"; // true,false,false,true,true

getValue(0,flag); // true
getValue(2,flag); // false