0 Replies Latest reply on Jan 28, 2007 3:06 PM by centralperks

    Loading Multiple items into flash

      Hey everyone,

      Ok so i have posted a few times asking for help on loading things from a data base into flash and have gotten alot of help.
      But here is the last thing i need .

      This is my problem , i a combo box that allows me to select a category , then the data is loaded via PHP and mySQL into a data grid . Upon selecting the next item in the data grid it loads the data associated with the item selected in the data grid. (i.e. Name , Phone number, emal , website etc...)

      What i need is for the selection to load multiple items into multiple labels and Loaders.
      So for example ....

      The person selects the business category.
      Then the person selects the business.

      The action script i have so far works :

      1 : business_dg.vScrollPolicy = "auto";
      2 : DGlistener = new Object();
      3 : //function called when you press on a cell in datagrid
      4 : DGlistener.cellPress = function(evt){
      5 : if(evt.target==business_dg){
      6 : var nr:Number = evt.itemIndex
      7 : var st:String = evt.target.selectedIndex
      8 : _root.details_mc.company_txt.text = business_ds.items[st].Business;
      9 : _root.details_mc.address_txt.text = business_ds.items[st].Address;
      10 : _root.details_mc.tel_txt.text = business_ds.items[st].Telephone;
      11 : _root.details_mc.website_txt.text = "<a href=\""+business_ds.items[st].Website+"\" target=\"_blank\">"+business_ds.items[st].Website+"</a>";
      12 : _root.details_mc.email_txt.text = "<a href=\"mailto:"+business_ds.items[st].Email+"\">"+business_ds.items[st].Email+"</a>";
      13 : _root.details_mc.details_txt.text = business_ds.items[st].Details;
      14 : _root.details_mc.picture_img.load("images/"+business_ds.items[st].Picture);
      15 : this.updateData(0)
      16 : }
      17 : }
      18 : business_dg.addEventListener("cellPress", DGlistener);
      19 : //This line turns off the column sorting
      20 : business_dg.sortableColumns = false;
      21 : stop();

      I need this process to repeat and load several items. Where a business has 2 locations, i need it to load the info for the first loaction and the second loaction in the same components. So it loads the first batch of info to the first group of components , and i need the info for the other location to load to another set of components in the exact same format. So basically a repeating pattern. and so on.

      the stuff i have so far is posted at www.campusareaapts.com/business.html

      PLEASE PLEASE PLEASE help if you can.