Image caption People have been leaving tributes at a memorial set up behind the cinema where the shootings took place on Friday

US President Barack Obama has told victims of the attack at a Batman film screening in Aurora, Colorado, that the whole country is thinking of them.

Mr Obama met survivors and families of the dead when he visited the University of Colorado Hospital in Aurora.

He said he shared hugs and tears and vowed that "out of darkness a brighter day is going to come".

James Holmes, 24, has been arrested in connection with the attack, which killed 12 and injured 58.

Mr Holmes is alleged to have opened fire during a packed midnight screening of The Dark Knight Rises before being detained outside the cinema.

He is currently being held in solitary confinement for his own safety and is reported to be not co-operating. Aurora Police Chief Dan Oates said Mr Holmes had "lawyered up" and is not talking.

'Words inadequate'

President Obama said he had visited as much as a father and husband as a president, because everyone understood what it must be like to have someone taken in this fashion.

Media playback is unsupported on your device Media caption President Obama: "The entire country is thinking of the victims' families"

He said: "You see young people who have come in and just two days ago or 36 hours ago or even 24 hours ago, it wasn't certain whether they would make it and now suddenly their eyes are open, they are alert, and they are talking and it reminds you that even in the darkest of days... life continues."

Mr Obama added: "I confessed to them words were inadequate but my main task was to serve as a representative of the entire country and say we are thinking about them at this moment each and every day."

The president said he had shared hugs and tears, but also laughter as the families recounted the lives of their loved ones.

Mr Oates said: "As awful as what they've been through and what they're going through has been, having the president here is very, very powerful."

Both Mr Obama and his Republican Party challenger, Mitt Romney, curtailed their election campaigns in the wake of the Aurora attack, dropping advertising in Colorado state out of respect for victims and their families.

Image caption The people of Aurora gathered for a vigil on Sunday outside City Hall

People have been laying flowers at a memorial site near the Century cinema.

Thousands of people have also been gathering outside City Hall for an emotional vigil for the victims.

Police and army officers, and other officials were loudly applauded as they approached the stage.

Aurora Mayor Steve Hogan told the crowd: "While our hearts are broken, our community is not."

Colorado Governor John Hickenlooper refused to mention Mr Holmes by name, saying the priority was the 12 victims.

He said: "July 20th should never be about remembering the killer, it should be about remembering those individuals, remembering those victims. So I ask you to help me here."

As he then read out the names, the crowd chanted, "We will remember," after each.

Gun range

Mr Obama's visit comes a day after police cleared James Holmes's flat of explosives which could have killed people entering via the door.

Names of the dead Jessica Ghawi, 24

Veronica Moser, 6

John Larimer, 27

Alexander Boik, 18

Jesse Childress, 29

Jonathan Blunk, 26

Rebecca Ann Wingo, 32

Alex Sullivan, 27

Gordon Cowden, 51

Micayla Medek, 23

Alexander Teves, 24

Matthew McQuinn, 27 (presumptively identified, awaiting confirmation) Aurora shootings: The victims Profile: James Holmes

The FBI is now collecting evidence from the flat of Mr Holmes, who is accused of at least 12 counts of first-degree murder.

Investigators say a computer found inside his home could provide crucial details.

Several US media outlets have reported that a Batman mask and poster were in the flat, but police have not confirmed this.

Booby traps connected to explosives had prevented police from entering it for two days until they made the devices safe.

Police said the suspect had acted with "calculation and deliberation", taking ammunition deliveries for months.

James Holmes is due to appear in court on Monday.

Authorities have established no terrorism link, nor any motive. Mr Holmes had no criminal record other than a speeding fine.

It has emerged that Mr Holmes tried to join a Colorado gun range last month but owner Glenn Rotkovic told Associated Press he warned staff not to accept him after hearing a "bizarre - guttural, freakish at best" message left by Mr Holmes on his voicemail.

The Arapahoe county coroner Michael Dobersen has released the names of the dead.

He said all the deaths were related to gunshot wounds.

The dead include a six-year-old girl and two US military servicemen.

Mayor Hogan told a memorial service for a young victim on Saturday that the community in Aurora was still reeling from the "unbelievable tragedy".

"But I think, as is evidenced by everyone who is here today, all those who were here yesterday, and all the messages of support that we have received from literally around the world, we can I think now start this process of grieving and healing."