Swipe lag

Devin Asay devin_asay at byu.edu
Thu Feb 23 13:38:06 EST 2012


Hi all,

Coming up for air here. :)

I'm experimenting with using swipe gestures to move between cards on both iOS and Android. I set acceleratedRendering to true on preOpenStack. I am using a fairly simple script in a background group that is on every card. Here is the group script:

on mouseDown
    put the mouseH into sStartH
end mouseDown

on mouseUp
    if abs(the mouseH - sStartH) > 50 then
        if the mouseH < sStartH then
            goNext
        else
            goPrev
        end if
    end if
end mouseUp

command goNext
    lock screen for visual effect
    go to next card
    unlock screen with visual effect push left
end goNext

command goPrev
    lock screen for visual effect
    go to prev card
    unlock screen with visual effect push right
end goPrev

This works well on both an iPad 1 and a new Asus Transformer. But only on the first couple of swipes. After that there is a severe time lag before the card transition happens. It's worse if I try to move rapidly between cards. Usually (but not always) if I wait five or so seconds between swipe gestures it responds immediately. There seems to be no difference in this behavior between the old 1st gen iPad and the new Asus tablet, so it seems to be a problem with the LiveCode engine.

Has anyone else seen this? Is there a better way to respond to swipe gestures?

Regards,

Devin




Devin Asay
Humanities Technology and Research Support Center
Brigham Young University






More information about the use-livecode mailing list