Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 Flex 4.6缩放事件_Actionscript 3_Apache Flex_Flex4.5 - Fatal编程技术网

Actionscript 3 Flex 4.6缩放事件

Actionscript 3 Flex 4.6缩放事件,actionscript-3,apache-flex,flex4.5,Actionscript 3,Apache Flex,Flex4.5,我刚刚在Flex4.6中开始一个移动应用程序的新项目,需要一些帮助来决定如何继续 嗯,基本上应用程序会显示一个15x15的板,就像拼字游戏一样。因此,每个瓷砖的宽度将根据设备的最大宽度通过公式给出,因此每行将有15个瓷砖自动调整 问题是,我需要添加一些事件,比如缩放,它的范围从x1到x2,如果缩放大于x1,则移动到用户可以拖动电路板的位置 完成这个项目哪种方式更好 我有以下代码: <s:BorderContainer width="100%" height="60%" id="board_

我刚刚在Flex4.6中开始一个移动应用程序的新项目,需要一些帮助来决定如何继续

嗯,基本上应用程序会显示一个15x15的板,就像拼字游戏一样。因此,每个瓷砖的宽度将根据设备的最大宽度通过公式给出,因此每行将有15个瓷砖自动调整

问题是,我需要添加一些事件,比如缩放,它的范围从x1到x2,如果缩放大于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>

....... 他有更多的瓷砖,直到完成整个15x15板瓷砖

您可能需要
手势滑动和
手势缩放-查看Adobe的文档

…您是否在mxml中声明所有225个平铺?是的,我正在为每个平铺放置Rect组件。如果它们相同,为什么不创建并添加到循环中?这里的问题是如何限制平移区域当电路板被缩放并且比屏幕宽时,当您移动电路板时,到达屏幕轮廓时,上边框和左边框停止移动。这是scroller提供的标准功能