Question : How do you parse a string of data and load it into flash?

Hello all,

I have a real estate flash website with a search function. Currently, the search returns the data of each property as a string.    Each property entry has 4 fields (street, city, state, zip)  So the data is displayed like this in my dynamic text box:
-------------------------------
444 ocean street    
miami                    
florida                      
33139
777 hills avenue
orlando
florida
32789
234 oak street
palm beach
florida
33555

----------------This above is an example of how the data is loaded into flash.  (it was an example of 3 proprerties with the keyword of 'florida')

The data is all loaded into one dynamic text field with the instance name of 'results'

------------QUESTION.. how can i parse this data so that each entry is loaded into its own dynamic text box?

So Another words, I would like each entry to load into flash like this:
<-------------property 1 entry in its own dynamic text box--------------------->
444 ocean street    
miami                    
florida                      
33139
<-------------property 1 entry in its own dynamic text box--------------------->


<-------------property 2 entry in its own dynamic text box--------------------->
777 hills avenue
orlando
florida
32789
<-------------properyt 2  entry in its own dynamic text box--------------------->


<------------property 3 entry in its own dynamic text box--------------------->
234 oak street
palm beach
florida
33555
<-------------property 3 entry in its own dynamic text box--------------------->


I know it is just some action script that willl divide each entry into its own section, but i am not good at this, so I am leaving this to the pros, hoping that there is someone that knows a solution

I have attacehed the code snippet of my current Action script that loads the data as I mentioned above.

===========Anyone with any suggetions or solutions please post.  Thank you thank you.

sammy
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
gatherData = function () {
    myData = new LoadVars();
    myData.keyword = keyword.text;
    myData.toFlash = this.toFlash;
    myData.onLoad = function() {
        results.html = true;
        results.htmlText = myData.toFlash;
    };
    myData.sendAndLoad("dbquery.php", myData, "GET");
};
 
sendButton.onPress = function() {
    gatherData();
};
Open in New Window Select All

Answer : How do you parse a string of data and load it into flash?

if i'm understanding your predicament here.
simple example
create a variable called selectedProduct

var selectedProduct:Number;

when they select the product, i.e. product 3 set the variable to 3.

then post to your php
your php should have something along the lines of

$selectedProduct = $_POST['selectedProduct'];

which will then get the index and it can go do a select statement accordingly and populate the new page on the fly.
Random Solutions  
 
programming4us programming4us