0
votes

I'm just starting a new project in Flex 4.6 for a mobile application and need some help deciding how to proceed.

Well, basically the app will show a 15x15 board like the scrabble one. So, the width of each tile will be given by a formula depending on the max width of the device and so each row will have 15 tiles automatically adjusted.

The question is that I need to add some events like ZOOM which will range from x1 to x2 and MOVE where a user can drag the board in case ZOOM is greater that x1.

Which could be the better way to accomplish this project?

I have the following code:

<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
...do you declare all your 225 tiles like that in mxml? - user1875642
yes i'm doing it placing Rect component for each tile. - Apalabrados
why don't you create and add then in a loop if they are the same? - user1875642

1 Answers

0
votes

You probably want the GESTURE_SWIPE and GESTURE_ZOOM - see the Adobe's doc Touch, multitouch and gesture input