我刚刚在Flex 4.6中为移动应用程序启动了一个新项目,并且需要一些帮助来决定如何继续。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>
...你宣布你的所有225瓦一样,在MXML? – user1875642
是的,我正在把它放在每个瓷砖Rect组件。 – Apalabrados
为什么不创建并添加然后在循环中,如果他们是相同的? – user1875642