That used to be done by the eval() function, but eval is evil and was later deprecated and subsequently removed from the language. I’m not aware of any replacements for AS3, but trying to dynamically evaluate AS code is not an ideal situation
Why not just assign the result of that logical statement to a variable and test against that, anyway?
Or even more to the point, just write it in the if statement. If you have ifs that only have if (variable) and the actual logic is some hundred lines away… not good for code readability