B/X rules aren't super clear on the order of things, basically just saying you can move up to 1/3 your BMR, "and also attack".
For my games, I'm actually fine with you making your non-movement Action any time during the PC's turn. So you can attack first then move; move first then attack; or even move some of your movement distance, make an attack, and then and finish your movement. The latter option works well if you're trying to get a quick strike in on an enemy as you dash past.
In the IRL game I run I have a rule that if you break up your movement to run up on an enemy, strike him, and then retreat the same direction you came from (as opposed to running past), all movement after your attack is considered a fighting retreat and is halved.
For example, say Gilly is standing 10' from the hole in the wall and a brigand steps up. Gilly has a 120' BMR, so she normally gets to move 40' on her turn. So she runs 10' up on the man (meaning she has 30' of movement left), stabs at him with her dagger, and then backs up the way she came. Since she's backing up from the same direction she came (as opposed to dashing by) she's engaging in a fighting retreat and her remaining movement of 30' is halved. She can only retreat 15'.
If she ran 10', struck at him, and continued past in the same direction she was already going, that's not a fighting retreat, so she gets to move her remaining 30'. But the act of doubling back again eats a lot of your remaining movement.
Does that make sense?