"flag and start" are normally false.
lastMillis is unsigned long
start and flag are boolean
When you are ready to turn on the LED cycle, make start = true.
if(start == true)Â // do we want to start the LED on/off cycle?
{
 lastMillis = millis(); // initialize the timing
 digitalWrite( myLED, HIGH); // turn LED on
 start = false; // this prevents reinitializing lastMillis
 flag = true; // this enables the timing checking
}
if(flag == true && millis() - lastMillis >= 1000UL) // if we in in checking mode, has the time expired?
{
 digitalWrite(myLED, LOW); // turn led off
 flag = false; // this disables timing checking
}