Have a string variable that is called State. When state is equals "Left" enemy sprite simulate platform pressing left.
When state is "Right" simulate platform pressing right.
You can change the state of the sprite by having invisible collision boxes that the sprite can collide with.
Hope this helps.