non è granchè chiaro..
hai una sola variabile?
perchè qua usi
if ($FlashData = "Command")
invece di
if ($FlashData == "Command")