3 Replies Latest reply on May 23, 2012 9:33 AM by roymeo_

    TouchEvent Freezes Screen

    clementyew

      Hi,

       

      I'm facing this issue on Windows 7 Touch Screens (Dell, Acer etc).

       

      When someone touches an object with "TouchEvent" listener, any other animation happening on the screen will freeze for like 1 second.

       

      This happens when the user touches and hold on the screen.

       

      How do you solve this issue?

        • 1. Re: TouchEvent Freezes Screen
          roymeo_ Employee Moderator

          Can you provide some code example?

          There should be plenty of examples on the web to try and see if they're having the same problem.

          • 2. Re: TouchEvent Freezes Screen
            clementyew Level 1

            Erm,

             

            How should I put it?

            Any regular touch event would cause that.

             

            E.g :

             

            var ldr:Loader = new Loader();

             

            // ldr loads some image content

             

            ldr.addEventListener(TouchEvent.TOUCH_TAP,onTap);

             

            function onTap(e:TouchEvent){

            //do something

             

            }

             

            Let's say the loader content is a looping swf animation, that animation will pause when the finger is on the screen (press and hold).

            It freezes for about 1 second before continuing.

            Any other animations, swf's running will also freeze. I'm using Windows 7 and an Acer 23' Dual Touchscreen.

             

            Any idea how to prevent this? Is there some method to let the Display enterframe run immediately after the touch is detected?

            • 3. Re: TouchEvent Freezes Screen
              roymeo_ Employee Moderator

              OK, Since I don't know what level of programmer you are, I'm just trying to check that you're not doing something like sitting in a tight loop in your function onTap() and I'm also looking for a reproducable case or a common example so we're on the same page.  I found this page http://help.adobe.com/en_US/as3/dev/WS1ca064e08d7aa93023c59dfc1257b16a3d6-7ffe.html which has a TOUCH_TAP event.

               

              So you see a lag even when you do nothing at all in there at "//do something"?  That indicates to me something is definitely wrong somewhere that throwing an UpdateAfterEvent wouldn't really fix.