Pass a javascript value back to actionscript

is there a simple way to just pull back a true or false value from an associated javascript file to a flash file? here is what i have:


var bincheck:Boolean = fscommand("eval", "parent.check_bins(\\'"+img+"\\')");

 if (!bincheck){return false;}
	return true;

check_bins(img) is a function in my javascript file that simply iterates through an array, returning false if “img” is found. im simply trying to get the true or false value back into flash, but its not proving that simple. i added a couple alerts so that i could see what the “bincheck” value was, and i keep getting an ‘undefined’ value for “bincheck” in flash.

any suggestions?