Arduino motor control

Hi guys, I have an Arduino Uno and an adafruit motor shield… i want to be able to control the two motors at the same time…i have a code below that doesnt work, if you guys have a better structure or code please point it out.thnks

#include <AFMotor.h>

AF_DCMotor motor(2, MOTOR12_64KHZ);
AF_DCMotor motor1(3);

void setup() {
Serial.begin(9600);

}

void loop() {

motor.setSpeed(255);
motor.run(FORWARD); // turn it on going forward
delay(1000);
motor.run(RELEASE);

motor1.setSpeed(255);
motor1.run(FORWARD); // turn it on going forward
delay(1000);
motor1.run(RELEASE);

}

well look at the code (best would be to post it within the code brackets BTW)

Conceptually you continually do this:

you start "motor" forward at speed 255
you wait 1 second
you stop motor (release removes power from the motor)

you start "motor1" forward at speed 255
you wait 1 second
you stop motor1

what you probably want to do is

you start "motor" forward at speed 255
you start "motor1" forward at speed 255
you wait 1 second
you stop motor 
you stop motor1

that is still poor because the loop will kick in again and right after stopping the motor you will start them again for 1 second...

if you do this, the motors will be on and off for 1 second at at time.

you start "motor" forward at speed 255
you start "motor1" forward at speed 255
you wait 1 second
you stop motor 
you stop motor1
you wait 1 second

ideally you would need a button and when you press on the button you stop the motors or something

code should become obvious now?