Enemy walking back and forth AI in actionscript 3

I’m trying to create AI for enemies in my game to walk back and forth and since I’m new to this I’m completely lost. can anyone show me code on how to do this, I would greatly appreciate it. All I have now is a box that is a MC as a test for my AI.