Flex 4.6缩放事件

时间:2012-12-28 20:47:40

标签: actionscript-3 flex flex4.5

我刚刚在Flex 4.6中为移动应用程序启动了一个新项目,需要一些帮助来决定如何继续。

好吧,基本上这个应用程序会显示一个像拼字游戏一样的15x15板。因此,每个图块的宽度将由公式给出,具体取决于设备的最大宽度,因此每行将自动调整15个图块。

问题是我需要添加一些事件,比如ZOOM,范围从x1到x2和MOVE,用户可以拖动电路板,以防ZOOM大于x1。

这可能是完成这个项目的更好方法吗?

我有以下代码:

<s:BorderContainer width="100%" height="60%" id="board_holder">
    <s:TileGroup width="100%" requestedColumnCount="15" requestedRowCount="15">
        <s:Rect radiusX="{radio_tile}" radiusY="{radio_tile}" width="{_ancho_tile}" height="{_ancho_tile}">
            <s:fill>
                <s:SolidColor color="#FB2A27" alpha="0.75" />
            </s:fill>
        </s:Rect>

        <s:Rect radiusX="{radio_tile}" radiusY="{radio_tile}" width="{_ancho_tile}" height="{_ancho_tile}">
            <s:fill>
                <s:SolidColor color="#FB2A27" alpha="0.75" />
            </s:fill>
        </s:Rect>

        <s:Rect radiusX="{radio_tile}" radiusY="{radio_tile}" width="{_ancho_tile}" height="{_ancho_tile}">
            <s:fill>
                <s:SolidColor color="#FB2A27" alpha="0.75" />
            </s:fill>
        </s:Rect>


               ....... he there are more tiles till complete the whole 15x15 board tiles

    </s:TileGroup>
</s:BorderContainer>

1 个答案:

答案 0 :(得分:0)

您可能想要GESTURE_SWIPEGESTURE_ZOOM - 请参阅Adobe的文档Touch, multitouch and gesture input