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

MultitouchInputMode - Adobe ActionScript® 3 (AS3 ) API Reference

Explorer ,
May 10, 2013 May 10, 2013
TOPICS
ActionScript
986
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
Community Beginner ,
May 10, 2013 May 10, 2013

Can someone plse Simplify a whole bunch of things for me?

my question: I heard from an Adobe page that you can use MouseDown on a bb Tablet. Can you use MouseDown for separate functions two buttons touched on the screen??? ?thnx, in advance

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
Community Expert ,
May 10, 2013 May 10, 2013

what's a "bb tablet"?

and your question is unclear.  are you asking if two different buttons can use two different mousedown listener functions? (if yes, the answer is yes).

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
Community Beginner ,
May 12, 2013 May 12, 2013

I really appr. your answer ! To this fragmented question lurking in the midst of these cyberseas. It got to me be4 the end of the second night! to clarify, I heard you can use MouseDown on (Blackberry Playbook, is bb tablet)  as opposed to having to change all listeners on the actionscript file you can just keep your MouseDown listeners for screen touches. Presuming this is true, can the Blackberry Playbook handle two normal buttonobjects simultenously listeninging for just 'finger on button' events using only the mousedown methodiology?

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
Community Expert ,
May 13, 2013 May 13, 2013
LATEST

yes, touch devices work well with MouseEvent.MOUSE_DOWN.

and yes, you can have multiple buttons listening for mousedown events.  and yes, those buttons can check for simultaneous mousedown events.

one way to check for simultaneous mousedown events (and there are better ways especially if there might be more than 2 simultaneous events to check) is to use:

var btnsDownA:Array = [];

btn1.addEventListener(MouseEvent.MOUSE_DOWN,btnDownF);

btn1.addEventListener(MouseEvent.MOUSE_UP,btnUpF);

btn2.addEventListener(MouseEvent.MOUSE_DOWN,btnDownF);

btn2.addEventListener(MouseEvent.MOUSE_UP,btnUpF);

function btnDownF(e:MouseEvent):void}

if(btnsDownA.indexOf(e.currentTarget.name)==-1){

btnsDownA.push(e.currentTarget.name);

if(btnsDownA.length==2){

// do whatever -  simultaneous mousedown events.

}

}

}

function btnUpF(e:MouseEvent):void}

if(btnsDownA.indexOf(e.currentTarget.name)>-1){

btnsDownA.splice(btnsDownA.indexOf(e.currentTarget.name),1);

}

}

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