开发者

Handling a swipe effect (flex AIR) with extra functionality

I have some text content in a scrollable container and I want the user to be able to scroll it having the nice effect of it moving according to the swipe velocity and to keep scrolling until the user taps it. (as many applications for mobile touch screens).

I am thinking to combine events to do it. I will catch the swipe to know the direction, have mouse in and out to see velocity and legth of the swipe, and then keep scrolling with a proportional velocity and length until the user 开发者_开发技巧taps the screen.

Does my idea makes sense? (I don´t want to do the work and find out it was really simple and I just didn{t knew how)

Thanks in advance

Maria


A scroller will achieve this for you:

<s:Scroller left="0" right="0" top="0" bottom="0">
    <s:VGroup>
            <!-- Your content e.g. -->
                <s:TextInput/>
    </s:VGroup>
</s:Scroller>

Click the screen and drag in the direction. Tap to stop the movement or wait till it ends.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜