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

Problem with Touch Events

New Here ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

I'm using Touch Events for my iPad app rather than gestures.

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

I have a large MC called tiles, which is essentially 4 screens long that drags from screen to screen (4x(1024x768)).

I have an MC called mainMenu within tiles, for example tiles.mainMenu

The problem is when I touch tiles.mainMenu with 2 fingers, it becomes draggable.

Does anyone know how I can disable the 2 fingers causing this MC to become draggable? Please note, this happens to any movieclip within tiles... not just mainMenu.

The problem used to happen when I touched tiles.mainMenu with 1 finger but I fixed it by removing the event listener from tiles when tiles.mainMenu was pressed. This was my solution in as3 below that fixed the problem with 1 finger touching the mainMenu... now I need to work out how to fix the problem with 2 fingers touching the mainMenu as I can't submit this app until I get this fixed... please help

tiles.mainMenu.addEventListener(MouseEvent.MOUSE_DOWN, mainMenuDown);

tiles.mainMenu.addEventListener(MouseEvent.MOUSE_UP, mainMenuUp);

function mainMenuDown(event:MouseEvent):void {

trace("Mouse Down triggered");

//remove the event listener so the buttons can't be dragged around the screen

tiles.removeEventListener(TouchEvent.TOUCH_BEGIN, homeTouchBegin);

tiles.removeEventListener(TouchEvent.TOUCH_END, homeTouchEnd);

}

function mainMenuUp(event:MouseEvent):void {

trace("Mouse Up triggered");

//remove the event listener so the buttons can't be dragged around the screen

tiles.addEventListener(TouchEvent.TOUCH_BEGIN, homeTouchBegin);

tiles.addEventListener(TouchEvent.TOUCH_END, homeTouchEnd);

}

TOPICS
Development

Views

1.4K

Translate

Translate

Report

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
Adobe Employee ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

Could you please post a sample working source which demonstrates the problem.

-Pahup

Votes

Translate

Translate

Report

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
New Here ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

Hi Pahup, do you mean the FLA when you say a sample working source?

Can I attach files?

Votes

Translate

Translate

Report

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
Adobe Employee ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

You can send it to pahup      at        adobe      dot       com

-Pahup

Votes

Translate

Translate

Report

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
Adobe Employee ,
Jul 24, 2011 Jul 24, 2011

Copy link to clipboard

Copied

Hi Mike,

I tried you app, it looks like a bug to me.

Could you please file it http://bugbase.adobe.com, please add all the required sources to reproduce the problem.

Thanks

-Pahup

Votes

Translate

Translate

Report

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 ,
Jul 25, 2011 Jul 25, 2011

Copy link to clipboard

Copied

I posted this in Mike's other post earlier, but it's relevant here, as I found some serious bugs:

Hi folks,

Apart from my question about expanding more pages in Mike's draggable demo, I ran into big problems when I tried to do more.

I  thought it would be great to try out a long, draggable background  containing interactive vector movieclips. At the moment I'm working on  an interactive ebook for kids, and to keep it simple you just touch  arrows to go from page to page.

However, when I put a couple of test movieclips inside, this is what happened:

-  I was able to initiate button presses to load movie clips using  'TOUCH.TAP', and I was surprised this didn't interfere with the  scrolling effect.

- BUG 1: I have a Frog movie clip which  is animated on one frame, containing several parts inside the clip. when  I drag over this frog, I can pull its parts to pieces!

-  BUG 2: Another character can be touched, which fires the button inside  it, however, after a few touches it teleports to another panel, and gets  stuck

at the top of the screen.

I'm not sure how  adaptable Mike's code will be in that case, so maybe best to stick to  flat pngs.. or maybe Air 2.7 is causing the bugs?

Anyone else had this problem?

Thanks,

Matt

Votes

Translate

Translate

Report

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
Adobe Employee ,
Aug 10, 2011 Aug 10, 2011

Copy link to clipboard

Copied

LATEST

Matt,

It'll be great if you could send me a sample code which demonstrates both of the problems.

my email id is there in this thread.

-Thanks

Pahup

Votes

Translate

Translate

Report

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
Adobe Employee ,
Aug 10, 2011 Aug 10, 2011

Copy link to clipboard

Copied

Hey Mike,

Could you please try following in your listener. Use currentTarget instead of target.

event.currentTarget.startTouchDrag(event.touchPointID, false, homeDragBounds);

event.currentTarget.stopTouchDrag(event.touchPointID);

Thanks

-Pahup

Votes

Translate

Translate

Report

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