Police are investigating claims that a teenager killed himself because he was being blackmailed online.

Daniel Perry, 17, is thought to have fallen victim to a scam where internet users are lured into webcam chats and then blackmailed with the footage.

The teenager is said to have believed he was talking to an American girl on Skype but was told by blackmailers that the conversations had been recorded and would be shared with friends and family unless he paid up.

Daniel, an apprentice mechanic, from Dunfermline in Fife, died on July 15 by throwing himself off the Forth Road Bridge.

Police Scotland confirmed that officers are investigating the circumstances surrounding his death and urged anyone experiencing cyberbullying to report it.

It has also been reported that the teenager had previously been urged to commit suicide by anonymous users on the social media website Ask.fm about three months before he died.

The case follows that of 14-year-old Hannah Smith in Leicestershire, who took her own life after she was allegedly bullied online.

The operators of Ask.fm have been criticised for not doing enough to prevent abuse.

Daniel's mother, who asked not to be named, told newspapers that she wants to make other children and parents aware of the dangers.

She said she wished she could tell him that "nothing is ever that bad that you have to kill yourself" and "that nothing is worth taking your own life over".

She added that, when she feels strong enough, she wants to do something to prevent this happening to other young people.

Aileen Campbell, Scotland's minister for young people, offered her sympathies to Daniel's family and said bullying in any form is "absolutely unacceptable".

She said: "Modern technology offers great opportunities for education and communication but its misuse can be utterly devastating to those targeted and their families. Laws already exist to prosecute people for illegal behaviour online and our sympathies go out to the family of the teenager from West Fife.

"As well as making it easier to report online abuse, we need to educate parents and other adults around internet use. People need to know where to turn for advice and who will support them if they need to take action.

"Every child is taught about online safety and responsible use of personal mobile technology in school and our national anti-bullying service, Respectme, Childline and others are working hard to help people to tackle bullying behaviour in all forms and deal with its consequences."

Daniel's funeral was held at Dunfermline Crematorium and money was raised for the Royal National Lifeboat Institution.

Elaine Chalmers, manager of ChildLine Scotland believes young people need to be better educated about staying safe online.

She said: "It's absolutely heartrending that a young person could be deceived in such a way, with such a tragic outcome and our thoughts are with this young man's family.

"I think the sadness is that all of these tragedies are unique to each family, and they're in our thoughts.

"The internet is part of lives and communities now and we have to ask young people and parents to think about that, so just as we would want children to take care of themselves in a city centre or in park somewhere and we would talk to them about staying safe there, we obviously have to educate them about staying safe on the internet.

"If you've only seen a static picture of someone online they may not be who they say they are. It's important not to send people pictures of yourself or take part in video calls if you aren't sure who you are speaking to.

"These type of cyber-bullying incidents are increasing and becoming almost as common as bullying in the street or playground or wherever. Bullies are bullies wherever they are, so as the use of technology rises then all these issues also rise.

"The internet is a great thing for young people if we can support them to use it safely."

Willie Rennie, Scottish Liberal Democrats leader and Mid Scotland and Fife MSP, said: "This is obviously a tragic case and our thoughts are with Daniel's friends and family at this difficult time.

"It is important that we get to the bottom of what happened here and do what we can to ensure that it does not happen again.

"The internet has changed the way we live. We are connected with people across the country and around the world in a way that was simply unimaginable 20 years ago.

"But it is important that people are aware of the risks associated with being online - and know where they can get help if they need it. "

Hundreds of mourners gathered today to celebrate the life of Hannah, who was found hanged in her bedroom at the family home in Lutterworth, Leicestershire, by her sister two weeks ago.

Today more than 400 mourners arrived, dressed in bright clothing and onesies at the family's request, at St Mary's Church in the town for her funeral.

Hannah's father David Smith, dressed in a blue T-shirt and jeans, was among those who carried a purple coffin with "I love you" on the side out of the back of a blue Audi Q7 into the church as heavy rain poured down.

Purple and white balloons lined the aisle to the front of the church and a poster reading "Be Happy for Hannah" hung from a lectern with a picture of the teenager as the Rev Charlie Styles led the service to celebrate the teenager's life.

News of Daniel's death comes on the day that hundreds of mourners gathered to celebrate the life of teenage girl Hannah Smith who died after suffering brutal abuse at the hands of cyberbullies.

Hannah, 14, was found hanged in her bedroom at the family home in Lutterworth, Leicestershire, by her sister two weeks ago.

Today more than 400 mourners arrived, dressed in bright clothing and onesies at the family's request, at St Mary's Church in the town for her funeral.

Hannah's father David Smith, dressed in a blue T-shirt and jeans, was among those who carried a purple coffin with "I love you" on the side out of the back of a blue Audi Q7 into the church as heavy rain poured down.

Purple and white balloons lined the aisle to the front of the church and a poster reading "Be Happy for Hannah" hung from a lectern with a picture of the teenager as the Rev Charlie Styles led the service to celebrate the teenager's life.

Hannah's coffin was carried into the church to In The Air Tonight by Phil Collins.

Her sister, Jo, 16, walked behind the coffin, consoled by her stepmother, Deborah Smith.

During the service, there were readings by Nora Parker, headteacher of Lutterworth High School, and Hannah's cousin, Ben Hubbard.

Say It Right by Nelly Furtado, one of the teenager's favourite songs was also played.

Hannah's coffin was carried out to One Step Beyond by Madness before the congregation gathered on the grass outside the church carrying purple and white balloons from inside.

The balloons were then released into the sky after a count of "1-2-3 - Goodbye" from Mr Styles.