简体   繁体   English

Flex / Actionscript拖放/滑动效果(模拟android / ios界面)

[英]Flex / Actionscript drag and drop / swipe effect (simulate android / ios interface)

I am trying to simulate the interface of mobile (ios / android)... 我正在尝试模拟手机(iOS / Android)的界面...

  1. Drag the menu and you will see the part of previous or next page content 拖动菜单,您将看到上一页或下一页内容的一部分
  2. Release the menu and if you have dragged over 30% of page content. 释放菜单,然后拖动30%以上的页面内容。 It will do the transition between current page and target page. 它将在当前页面和目标页面之间进行转换。

I am just wondering is there any library or Flex component have already provided the above features? 我只是想知道是否有任何库或Flex组件已经提供了上述功能? I have google it but got nothing related to these features (wrong keyword?..). 我有谷歌它,但没有与这些功能有关(错误的关键字?。。)。 I can code it by hand but I would like to check whether my approach is the best way to do so... 我可以手动编写代码,但我想检查一下我的方法是否是这样做的最佳方法...

Thank you in advanced. 在此先感谢您。

i think you'll need to code the 30%-logic/etc. 我认为您需要对30%-logic / etc进行编码。 in any case - but here are some links you'll find useful: 无论如何-但以下一些链接对您有用:

  1. TweenMax - super handy, very flexible, very simple and straightforward compared to the cool things you can do with it; TweenMax-超级方便,非常灵活,非常简单明了,与之相比,您可以使用它来完成; especially useful when you want to quickly test a concept 当您想快速测试概念时特别有用
  2. a chapter in the book 书中的一
  3. fl.transitions fl.transitions

Using the Flex Mobile SDK, you'll note a similar interface, user experience, and functionality as found within native iOS applications. 使用Flex Mobile SDK,您会注意到与本机iOS应用程序中相似的界面,用户体验和功能。

The List component appears similar to iOS, such as how the scroll bar renders and the ability to spring before the list. List组件的外观类似于iOS,例如滚动条的呈现方式以及在列表之前弹出的功能。

I would take a look at Jason's Flex Blog from Adobe, Mobile List Paging with Page Indicator Skin: 我将看看来自Adobe的Jason的Flex博客,带有页面指示器外观的移动列表分页:

http://blogs.adobe.com/jasonsj/2011/11/mobile-list-paging-with-page-indicator-skin.html http://blogs.adobe.com/jasonsj/2011/11/mobile-list-paging-with-page-indicator-skin.html

页面滚动1页面滚动2

<s:List id="pagedList"
        width="100%" height="100%"
        verticalScrollPolicy="off" horizontalScrollPolicy="on"
        pageScrollingEnabled="true"
        itemRenderer="renderers.BackgroundColorRenderer"
        skinClass="skins.PagedListSkin">
    <s:layout>
        <s:TileLayout orientation="rows" requestedRowCount="1"
                      columnWidth="{pagedList.width}" rowHeight="{pagedList.height}"
                      verticalGap="0" horizontalGap="0"/>
    </s:layout>
    <s:ArrayCollection id="colorData">
        <fx:Number>0xFF0000</fx:Number>
        <fx:Number>0xFF9900</fx:Number>
        <fx:Number>0xFFFF00</fx:Number>
        <fx:Number>0x00FF00</fx:Number>
        <fx:Number>0x0000FF</fx:Number>
        <fx:Number>0x9900FF</fx:Number>
    </s:ArrayCollection>
</s:List>

There is a FXP of the project there. 那里有该项目的FXP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM