views:

371

answers:

1

How can I load text from MySQL to an HorizontalList in Flex3 ?

I am using :

<mx:ControlBar x="10" y="40" width="460" height="230">
            <mx:HorizontalList id="dataGrid"
                    dataProvider="{dataArr}"
                    labelField="lbl"
                    iconField="src"
                    itemRenderer="CustomItemRenderer"
                    columnCount="4"
                    columnWidth="100"
                    rowHeight="100"
                    horizontalScrollPolicy="on"
                    width="439" height="230"/>
        </mx:ControlBar>

And in the CustomItemRenderer.mxml

<mx:VBox horizontalAlign="center" verticalAlign="middle">

    <mx:Image source="{data.@thumbnailImage}" />

    <mx:Label text="{data.@nomept}" />

</mx:VBox>

I also did the "Create Application from Database.." and tried to integrate with the success but with no success.

A: 

You need to use a "server side solution" such as php / rails / python / cf / etc... in order to get the mySQL data to Flex. You can't execute mySQL queries directly from actionscript/flex, if you where using Adobe AIR, you could communicate with sqlite3

Cheers