3 Replies Latest reply: Nov 18, 2013 10:51 AM by rtakayasu
Oliboy50 Level 1 Level 1 (0 points)



i tried few things in iAd Producer but now what i need to do is "go to page myPage" after taping/clicking on one of the images contained by a GalleryView.


So i tried to handle this using the Activate event of my image layer, but the problem is that event is more like a didTouchDown event followed by a didTouchUpInside event than a true click event...


Sorry if i'm not clear enough, what i mean is that if i touch the image then drag the GalleryView then release my touch from the image : the Activate event will be triggered... but what  i wanted to do was just drag the GalleryView.


Does anyone know an alternative event that will be triggered only if the drag event is not triggered ?


(I'm a developer, i can write some JS code if needed.)


Thanks !

  • 1. Re: Click event (activate?) on images inside a GalleryView
    patixa Level 2 Level 2 (290 points)

    I don't understand your question. Are you trying to support both tapping and dragging of images? If so, you will need to override the various touch events. To create an event handler, select each image in the gallery, then Code > Object Events > Touched Down (as one example) > Execute JavaScript; a code snippet will appear in the Code Editor window to get you started.

  • 2. Re: Click event (activate?) on images inside a GalleryView
    Oliboy50 Level 1 Level 1 (0 points)

    Thank you for your reply.


    I thought the title of my question was clear enough.


    I want to click on images that are inside a GalleryView but only trigger the click event if the drag event isn't triggered itself... actually if I set a click event on those images now, I can't use the gallery view properly without trigger a click event...


    I thought i could do this using "event.preventDefault()" on click event if drag event is triggered... but that means users will have to be really accurate when clicking on images...


    Still don't know the best way

  • 3. Re: Click event (activate?) on images inside a GalleryView
    rtakayasu Level 1 Level 1 (45 points)



    You must be doing diffently than I am.  My gallery appears to be doing what you're looking for; swipe will change the gallery view (previous/next cell) and tap will activate my JS code.


    I have the gallery view with images on an iPhoen project.  The images in the 1st and 2nd cell have the onviewactivate event.  I just changed my image in my 2rd cell to got to page action.  Both behaves as expected on my iPod touch.


    If we can identify how you're doing differently, maybe we can help you.