1 Reply Latest reply on Feb 19, 2009 2:14 PM by robbyk87

    Generating Dynamic Content from XML/PHP

      Hey all,

      having a bit of an issue with gathering data and displaying data using php -> xml -> flex.
      Issue is this, database sends contents of news table, php makes it into <news></news> with author/message/date inside.

      All's well when I import into flex with the ResultEvent. However what I would like is to have the data split up and dynamically inserted into a middle canvas on my main.mxml. this middle canvas will hold different types of data you see so i cannot manually insert text boxes and so on.

      My little work-around so far is shown below.

      As you can see I have hard coded an iterator to values of 3 (only 2 news values in my db table atm) so firstly I would like to find out how to make a 'count' of the news nodes which I get returned - so that the iterator value is accurate.

      Secondly when I execute this code everything is fine except because i am using dynamic content - newsMessageUI.text does not conform to the width of my canvas (which is resizable etc). And also becuase there are 2 values coming from database - both values are laid ontop of each other - so 2 dates ontop of each other 2 author titles and 2 messages etc.

      All I need is a way to implement a TextField for my code (to allow word wrap etc) and a way to seperate the two retrieved pieces of info - was thinking another Vbox created to stack these one after the other?

      I'm really new to flex as you can tell by my code lol so any help tips or suggestions will be very helpful!

      Thanks a bunch!