Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

MAINZ, Germany — A hard-hitting video campaign has been launched by Swiss officials to prevent young people from getting killed while distracted by their cellphones.

Entitled "The Magic Trick," the video sees a narrator introduce a character named Jonas, a 24-year-old who enjoys listening to music and messaging friends — even while walking near traffic.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

"Jonas has no magical powers, but with a bit of assistance he's about to perform an incredible disappearing act. Here it comes..." the narrator says, seconds before Jonas is hit by a car as he crosses the street.

"There you have it, no more Jonas," the narrator says with a wry chuckle, over the screams of bystanders. "If you also want to try this cool trick for yourself, all you need is a phone, a few music tracks, a texting application, but above all a tiny bit of inattention," he adds.

In addition to the video, Lausanne police are using this poster to advertise the campaign to spread awareness of the dangers posed by inattention caused by personal electronic devices. Lausanne Police

Around 1,100 people were seriously injured in Swiss streets in 2013 because of inattention, according to the campaign. It is being run by police in the Swiss city of Lausanne.

"Just two weeks ago, a 16-year-old boy was crushed by two trams in Geneva and died," Anne Plessz of Lausanne Police told NBC News. "He had overlooked one of the trains when he was looking at his phone."

Police posted the black-humor video hoping it would go viral and shock young people into paying more attention to their surroundings. It went live Tuesday and in just three days has clocked up more than 1.8 million views and 12,000 Facebook shares.

Warning: The video includes a dramatization of someone being hit by a car that some viewers may find distressing.