Skip navigation
berkCakir
Currently Being Moderated

Adobe air iOS touch problem

Feb 13, 2012 5:34 AM

In my air projects I am using MouseEvents (MouseEvent.CLICK)  for touch functions.

It is working well on Android devices but, it is not working on iOS devices properly.

 

here are the videos for Android and iOS:

      android: http://youtu.be/ccWdsoqCY80

      ios    : http://youtu.be/5NERQbO7DJM

 
Replies
  • Chris Campbell
    9,454 posts
    May 4, 2010
    Currently Being Moderated
    Feb 13, 2012 5:30 PM   in reply to berkCakir

    Forwarded to the iOS team for their review.

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 15, 2012 8:49 PM   in reply to Chris Campbell

    @berkCakir

    Hi,

    What is the renderMode in your application - GPU or CPU? Could you please compile a small project that can demonstrate the bug and send it to me at sanika@adobe.com?

     

    Thanks,

    Sanika

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2012 9:11 AM   in reply to berkCakir

    Air 3.1, currently all work prefect.

     

    I use GPU mode, iOS 5.0.1 and iOS 4.3.3

     

    MouseEvent.CLICK work prefect it you add this string Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; to your init class. Because by default in iOS used gestures.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 29, 2012 3:24 PM   in reply to berkCakir

    Yeah, I'm seeing the same problem with MouseEvent.MOUSE_UP. Rendermode is set to auto, and I'm using the AIR 3.2 RC compiler.

     

    Looks like the iOS stuff is getting confused about Z-ordering. If I have a movie clip on top of another movie clip, sometimes tapping will send the mouse event to the clip underneath the one that should be getting the event. For example, I have a big "PAUSE" movieclip that covers the entire screen, and tapping on it (i.e. the MOUSE_UP event) will dismiss it. If I tap on it, it won't get mouse-events, sometimes requiring a half-dozen taps. Meanwhile the stuff underneath the pause movieclip will receive the events.

     

    Note that I am only seeing this on iOS. Android and Desktop are working properly.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 29, 2012 4:28 PM   in reply to John Hattan

    Please provide sample code so I can test. Because all that you said - don't work for me.

     

    also dont hesitate to use MovieClip.mouseChildren = false for included MCs to eachothers and MovieClip.mouseEnabled=false if you don't want affect MouseEvents for MCs.

     

    Also for MobileDevices better use TouchEvent.TOUCH_TAP rather MouseEvent.CLICK

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 29, 2012 10:15 PM   in reply to berkCakir

    Hi Berk,

     

    Can you please send a small application which can help us reproduce the bug and also please specify what renderMode you are using?Or you can log the bug with the bug files at bugbase.adobe.com .

     

    Thanks,

    Nimisha

     
    |
    Mark as:
  • Currently Being Moderated
    May 17, 2012 9:29 AM   in reply to Nimisha1

    Did this ever get resolved?  I have an app waiting to go to the app store right now but I can't release it until I get this figured out.  I'm noticing that the MouseEvent firing isn't consistent.  The ActionBar is the problem area for me.  My application is using RobotLegs and FB 4.6 (MXML based app)  but I don't think that has anything to do with my issue.

     

    Here are my trace statements from testing which actions get fired and if the action I am trying to take was successful or not.

     

    1 - Works

    mouseOver

    mouseDown

    focusIn

    buttonDown

    click

    mouseOut

    touchTap

     

    2 - Works

    mouseOver

    mouseDown

    focusIn

    buttonDown

    click

    mouseOut

    touchTap

     

    3 - Works

    mouseOver

    mouseDown

    focusIn

    buttonDown

    click

    mouseOut

    touchTap

     

    4 - nothing happening, no click or touchTap event

    mouseOver

    mouseDown

    focusIn

    buttonDown

    mouseOut

     

    5 - nothing happening, no click or touchTap event

    mouseOver

    mouseDown

    buttonDown

    mouseOut

     

    6 - nothing happening, no click or touchTap event

    mouseOver

    mouseDown

    buttonDown

    mouseOut

     

    7 - Working, repeated actionbar clicks

    mouseOver

    mouseDown

    buttonDown

    click

    mouseOut

    touchTap

     

    Partial code block:

    <s:navigationContent>

      <s:Button id="btnList" skinClass="spark.skins.mobile.BeveledActionButtonSkin" includeIn="map" width="40" height="40"

                                                        click="trace('click');dispatchEvent(event);"

                                                        touchTap="trace('touchTap')"

                                                        buttonDown="trace('buttonDown')"

                                                        focusIn="trace('focusIn')"

                                                        focusOut="trace('focusOut')"

                                                        mouseDown="trace('mouseDown')"

                                                        mouseOut="trace('mouseOut')"

                                                        mouseOver="trace('mouseOver')">

      <s:icon>

                                                      <fxg:iconList width="17" height="17" />

      </s:icon>

      </s:Button>

    </s:navigationContent>

     

    Any help or suggestion will be greatly appreciated!!!

     

    Also, the TouchEvent.TOUCH_TAP doesn't solve the issue we are having.

     

    Markus

     
    |
    Mark as:
  • Currently Being Moderated
    May 18, 2012 4:59 AM   in reply to Markus in Chicago

    Hi Markus ,

     

    I am unable to reproduce this issue(with the provided code here on ios 4.3.5 and 5.1) with 3.2 build but I'll suggest you to use the latest build 3.3 available at http://labs.adobe.com/downloads/air3-3.html . If you still face the issue then please let us know .

     

    -Nimisha

     
    |
    Mark as:
  • Currently Being Moderated
    May 18, 2012 7:41 AM   in reply to Nimisha1

    Switching out to 3.2 RC and 3.3 Beta now.  I will let you know what I find.  Where can I find the tbz2 version of AIR 3.3 beta or is it not necessary to have now?

     

    Markus

     
    |
    Mark as:
  • Currently Being Moderated
    May 18, 2012 9:09 AM   in reply to Nimisha1

    Nimisha1,

     

    What are the steps to install the AIR 3.3 SDK on a Mac?  The usual overlay method isn't available because AIR 3.3 is a DMG file instead of a regular jar. 

     

    Thanks again for your help!

     

    Markus

     
    |
    Mark as:
  • Chris Campbell
    9,454 posts
    May 4, 2010
    Currently Being Moderated
    May 18, 2012 5:20 PM   in reply to Markus in Chicago

    Markus,

    You should be able to use the ditto (ditto source destination) command after mounting the dmg:

     

    ditto /Volumes/AIR\ SDK/ path/to/flex/sdk

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    May 18, 2012 5:22 PM   in reply to Chris Campbell

    Got it to work using rsync.  MouseEvents are still slow to respond after a

    2 or 3 clicks.

     
    |
    Mark as:
  • Currently Being Moderated
    May 21, 2012 10:44 AM   in reply to Chris Campbell

    Chris,

     

    I would like to test out MouseEvent.RELEASE_OUTSIDE but can't seem to find it.  I'm wondering if my overlay worked or if RELEASE_OUTSIDE is not available in Flash Builder 4.6.  It would seem strange that it's only available in Flash CS 5.5 or 6.

     

    Any thoughts on this?

     

    Markus

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2012 4:17 AM   in reply to Markus in Chicago

    Markus,

     

    Which ipa target are you using and what is the device and iOS version ?

     

    -Nimisha

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2012 6:54 AM   in reply to Nimisha1

    I have tried both the Flash Builder 4.6 release build and the ADT ipa-debug-interpreter using the following SDKs

     

    FB 4.6.0 AIR SDK 3.1 - came with 4.6

    3.2 RC

    3.3 Beta - I was expecting to see MouseEvent.RELEASE_OUTSIDE here but it was not available to me.

     

    The command I used to overlay my original FB 4.6.0 AIR sdk is:

    rsync -avz /Volumes/AIR\ SDK/ AIR3.3_4.6.0/

     

    The device SDKs used to test with are:

    iPod Touch 4 generation - iOS 5.1.1

    iPad 2 HD - iOS 5.1.1

    iPhone 4 - iOS 5.1.1

    iPhone 4S - iOS 5.1.1

     

    Sample Build script:

    /Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adt -package -target ipa-debug-interpreter -provisioning-profile /Users/markusmcgee/Applications/SolsticeConsulting/BSPN_Mobile/BSPNMo bileApp/provisioning/XXXX.mobileprovision -storetype pkcs12 -keystore /Users/markusmcgee/Applications/SolsticeConsulting/BSPN_Mobile/BSPNMo bileApp/provisioning/Certificates.p12 -storepass XXXX BSPNMobileApp.ipa BSPNMobileApp-app.xml BSPNMobileApp.swf com/bspn/assets/icons -extdir /Users/markusmcgee/Applications/SolsticeConsulting/BSPN_Mobile/BSPNMo bileApp/libs/bin/ane -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platfor m/Developer/SDKs/iPhoneOS5.1.sdk/

     

    XCode Version 4.3.2 (4E2002)

     

    I'm also using an ad hoc distribution provisioning profile for testing.

     

    I did notice an extreme change in performance using AIR 3.3 Beta but my issue is the same as the original thread.  It seems like doing any type of navigator push pop view kills the MouseEvent.CLICK and TouchEvent.TOUCH_TAP event ( have tried both in testing and the result is the same as the vidoes in this thread ).

     

    If you need any more information let me know.

     

    Markus

     
    |
    Mark as:
  • Currently Being Moderated
    May 29, 2012 6:31 AM   in reply to Markus in Chicago

    Any word on this issue?  I found out avoiding navigator.popView (replaced with a pushView, all views must remember how to open from previous state after gb collection) makes a world of difference in my application.  The button lagginess is still there but not as much as before.

     

    Markus

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2012 2:18 AM   in reply to Markus in Chicago

    Hi Markus,

     

    Can you please log a bug at https://bugbase.adobe.com  and share the bug number with us ?Also please provide a sample application (with sources) which can reproduce the issue .

     

    -Nimisha

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2012 10:59 AM   in reply to Nimisha1

    What was the outcome of this?  I had issues with MouseEvent.CLICK.  I've switched to TouchEvent.TOUCH_TAP but would like to use GestureEvents instead.

     

    Thus, I believe I need to rely on MouseEvents once again for tapping standard buttons.

     

    Any progress made on this bug?  Do we have a bug number?

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2012 11:09 AM   in reply to cnickless

    Didn't file a bug with this.

     

    What I had to do was go back over my code with a fine tooth comb.  And

    double make sure I went over the best practices and optimization for AIR

    Mobile.  There are best practices floating around in a power point format

    to use.  Also, Michael Labriola  from Digital Primates did a talk or power

    point on what we should be doing in code from an optimization stand point.

     

    All of this helped out a lot and seemed to fix my button press actions.  If

    I remember correctly my button press actions didn't get resolved until I

    played with opaque backgrounds specifically though.  This is covered in the

    best practices for Adobe AIR for Mobile too.

     

    Hope this helps.  If I can think of anything else I will respond to this

    blog.

     

    Markus

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points