"This morning, we woke up to news of a tragedy that reminds us of all the ways we are united as one American family," Obama said of the mass shooting during a midnight showing of "The Dark Knight Rises," the latest Batman movie, at a theater complex in Aurora, Colo. Twelve people died and dozens more were injured.
Presumptive Republican presidential nominee Mitt Romney also offered his condolences "to those whose lives were shattered in a few moments, a few moments of evil, in Colorado."
"While we may never understand what leads anyone to terrorize their fellow human beings like this," Obama said, "we do know what makes life worth living."
Obama had several campaign events scheduled in Florida, but canceled them after receiving word of the shootings.
"I am so grateful that all of you are here. I am so moved by your support," Obama said. "But there are going to be other days for politics. This, I think, is a day of prayer and reflection."
As parents, Obama said he and wife Michelle will "be fortunate enough to hug our girls a little tighter tonight."
Obama asked for a moment of silence. It was broken by the cries of a baby.
"I hope all of you will keep the people of Aurora in your hearts and minds today," Obama said. "May the lord bring them comfort and healing."
As a result of the day's events, Obama asked the audience to "spend a little time thinking about incredible blessings that God has given us."
While the facts were still being gathered, the federal government "stands ready to do whatever is necessary" to bring the perpetrator of "this heinous crime" to justice," Obama said to rousing applause.
He said he spoke to both the Aurora mayor and the governor of Colorado.
If anything, an incident such as the one in Aurora shows that "life is very fragile," Obama said. "Our time here is limited and is precious. What matters at the end of the day is not the small things, not the trivial things ... [but] how we chose to treat one another and how we love one another."
Upon returning to the White House, Obama ordered flags lowered to half-staff at all U.S. government and military installations to honor the victims. Campaign spokeswoman Jen Psaki said all campaign ads would be pulled from Colorado stations.
Vice President Joe Biden and the first lady also canceled events Friday.
Romney opened a campaign event in New Hampshire with remarks about the Aurora movieplex shooting.
"I stand before you today not as a man running for office, but as a father and grandfather, a husband, an American," Romney said. "This is a time for each of us to look into our hearts and remember how much we love one another and how much we love and how much we care for our great country. There's so much love and goodness in the heart of America."
To help alleviate the "sense of grief," Romney said, "we can offer comfort to someone near us who is suffering or heavy-laden, and we can mourn with those who mourn in Colorado."
Bringing the suspect to justice is a matter for another day, Romney said.
"Today is a moment to grieve and to remember, to reach out and to help, to appreciate our blessings in life," Romney said.
Biden said in a statement he and his wife, Jill, also were shocked by the tragedy.
"The reason this is so deeply felt by all Americans is that, but for the grace of God, the victims could have been any one of our children, in any one of our towns," he said.
Kate Middleton recycles dress at movie premiere
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'