2 Replies Latest reply on Oct 24, 2013 1:19 AM by Salieri_purple

    Finding the tap function on touch devices


      Hi there,


      I have an object that toggles in on the click of another object using




      under the touchStart command. This is all the code I have put in.


      When I view this on an iPad I can tap the button and the other object pops in - but then it vanishes as soon as I let go. I take this to be an innate feature of touchStart? How does one go about getting something to stay activated under these conditions?



        • 1. Re: Finding the tap function on touch devices
          jbowden Adobe Employee



          Not sure I fully understand what you're trying to do. The .toggle() method toggles between show and hide. The problem is, once you hide something, it no longer responds to events such ast touchStart.


          Maybe you can describe in more detail what you are trying to make happen, and we can see if it's something that can be done?




          1 person found this helpful
          • 2. Re: Finding the tap function on touch devices
            Salieri_purple Level 1

            Hi there,


            Thanks for replying.


            The problem was I was using the touchstart event in Edge animate on a button which was calling the toggle method on another object - the idea being the button would stay visible and the object would appear and vanish accordingly. It worked fine in the browser, but when I put this out to the iPad via InDesign, the functionality broke - the object would reappear when I took my finger off the button.


            I have fixed this (so far) by removing the touchstart event and replacing it with the click event, which seems to be interpreted properly as a 'tap' event when I view it on a tablet. So fingers crossed...