Instead of adding another variable, you can just check the MoveXY variables to see if they are = to 0 in event 3. I have added that to the attached version.
I am guessing it is events 4 and 7 that are the ones you are having trouble with. Simply put, these 2 events find which direction the player is dragging. This set of events makes sure the sprite only travels vertically or horizontally, not both.
The abs function returns the absolute value so if the amount from the subtraction is negative, abs returns the positive equivalent (in other words abs(-5)=5 and abs(5)=5).
Event 4 triggers when the distance between Touch.X and Sprite.X is greater or equal to the distance between Touch.Y and Sprite.Y.
Event 7 triggers when the Y distance is greater (basically any time event 4 doesn't trigger).
<Edit> I just realized, I was setting 2 variables, InitialX and InitialY, but never using them. These 2 variables were meant to make sure the player touched the sprite before allowing movement to happen. That is why you could touch anywhere and the sprite would move. Sorry about that. It is fixed.