Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Disable ctrl+v and Paste function in SWF file

Guest
Apr 25, 2017 Apr 25, 2017

First of all, its my fiorst post so It might be in a wrong section, my Appologies for that

I am runing a Chat site, its running on html5 and Flash interfaces,
there are some spammers coming and Pasting the same text lines, so I disabled the Paste and ctrl+v function in HTML page, but can someone help me how to disable that on my SWF file !

Thank you for your time

247
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 25, 2017 Apr 25, 2017

Well that's not ideal.

Anyway, you could listen for the paste event on your textfield and erase it when that's dispatched. However, that would be terrible UX because it would disable legitimate use of paste like words being moved around within a post, or pasting a URL. A slightly less dreadful solution would be to listen for the change event instead, and only interfere when the difference between the pre-change and post-change text is beyond a certain length threshold, large enough that it wouldn

...
Translate
Community Expert ,
Apr 25, 2017 Apr 25, 2017

This might be better off over in the Animate (formerly Flash) forum. I'll move it for you...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 25, 2017 Apr 25, 2017

If you already have an HTML interface, what's the point of the Flash interface?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 25, 2017 Apr 25, 2017

HTML is for mobile users and has not all the functions and Flash is for Desktop users

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 25, 2017 Apr 25, 2017
LATEST

Well that's not ideal.

Anyway, you could listen for the paste event on your textfield and erase it when that's dispatched. However, that would be terrible UX because it would disable legitimate use of paste like words being moved around within a post, or pasting a URL. A slightly less dreadful solution would be to listen for the change event instead, and only interfere when the difference between the pre-change and post-change text is beyond a certain length threshold, large enough that it wouldn't interfere with most legitimate usage.

Or best of all, you could blacklist the strings they're pasting, or the IP ranges they're posting from.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines