motor and led control

so for my engineering class i got assigned an arduino project. for my project i want to have a scale rotary engine controlled by a stepper motor turn and while its turning have multiple led's tun on to identify the strokes and then stop. i know hoe to program it to do either or both one after the other but i don't know how to do both at the same time and then stop. could anyone help me figure out the coding?

Well, take the necessary number of steps, turn off the previous LED, turn on the current LED, then take steps until it reaches the next destination.

Turning LEDs on and off will take just a few nanoseconds, so you won't notice the stepper motor stop while the LEDs are changing. It will appear to move continuously.

i didnt even think about doing it like that thanks. after it runs through the loop what would be the best way to have it stop? i tried using break but i wasn't able to get it to work i think the error i got was that the break command wasn't in the loop

while(1){}  //  locks up the board until you reset it.

You probably want a button to "reset" and start the rotation again. Assuming the button is wired with an internal pullup, then the following code will wait until the button is pushed.

  while(digitalRead(buttonPin)) {
    //wait until button is pushed
  }

(Fixed, thanks Delta.)

MorganS:   while(digitalRead(buttonPin)) {     //wait until button is pushed   }

You missed the {.

after it runs through the loop what would be the best way to have it stop?

Put everything in setup() instead.