Stuck with if statements in actionscript

See Tip: Escaping curly brackets for substitutions in ActionScript for more discussion on escaping { and } when needed.