我剛剛在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