/*	Version:  1.1
	1.1		nestedEval can now refer use either "_this" or "RAM" as the target of "this." in variable paths
*/
function checkAllFlags( flag_array, flagRoot ){
	#include "nestedEval.as"
	#include "checkFlag.as"
	var testResult = true;		// sprite will display, unless there's a reason not to
	
	for( var sf=0; sf<flag_array.length; sf++ )
	{// for:  each of this sprite's flags
		var thisSpriteFlag = flag_array[sf];
//			trace("\t checking:  "+thisSpriteFlag);
		// Prefer "_this" otherwise prefer "RAM" otherwise prefer "this"
		var thisName = "this";
		if( RAM )		thisName = "RAM";
		if( _this )		thisName = "_this";
		testResult = checkFlag(  nestedEval( thisSpriteFlag, "RAM", thisName)  , flagRoot );		// decide whether to add it or remove it
		//testResult = checkFlag( thisSpriteFlag, flagRoot );		// decide whether to add it or remove it
		if(testResult==false)
			break;		// the moment a test fails, stop checking
	}// for:  each of this sprite's flags
	
	return testResult;
}// checkAllFlags()