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

Using Action Script to detect single left-click, double left-click, and right click

Explorer ,
Jun 01, 2017 Jun 01, 2017

I'm volunteering my time to teach individuals with disabilities to type and how to use office. However, when it came time to teach them office I found out that they do not know the basic keyboard commands, how to highlight text, or how to single left-click, double left-click, or right-click. I've used Flash before to create websites and other basic apps but I'm not good with Action Scripting and I know that what I want to teach will require a lot of Action Scripting. Could someone please help me figure this out? I would really appreciate it!!!

1.4K
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

Community Expert , Jun 01, 2017 Jun 01, 2017

There are a bunch of examples in the AS3 docs - I'd start there:
MouseEvent - Adobe ActionScript® 3 (AS3 ) API Reference

Translate
Community Expert ,
Jun 01, 2017 Jun 01, 2017

There are a bunch of examples in the AS3 docs - I'd start there:
MouseEvent - Adobe ActionScript® 3 (AS3 ) API Reference

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 ,
Jun 01, 2017 Jun 01, 2017

Here is the help document for mouse events:

MouseEvent - Adobe ActionScript® 3 (AS3 ) API Reference

You can see that you can listen for CLICK for left mouse click, RIGHT_CLICK for right mouse click, and for DOUBLE_CLICK.

One catch is that to read doubleclicks you have to set the doubleClickEnabled = true;

The bottom of the page includes example code.

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
Explorer ,
Jun 01, 2017 Jun 01, 2017

Thank you for the information for mouse click events but what about highlighting text and using keyboard commands such as Ctrl-C to copy and then CTRL-V for pasting?

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 ,
Jun 01, 2017 Jun 01, 2017

Adobe ActionScript 3.0 * Selecting and manipulating text

I'm not sure what you're expecting regarding Ctrl-C and Ctrl-V. Those are physical, off-screen actions.

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 ,
Jun 01, 2017 Jun 01, 2017
LATEST

Here is the help for reading keyboard events:

KeyboardEvent - Adobe ActionScript® 3 (AS3 ) API Reference

You can see that you can tell what key is pressed, and whether the command or control key is pressed. It's not trivial to take care of all possible user actions.

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