A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Dynamic ComboBox problem -- help me plz

  1. #1
    Junior Member
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    13

    Dynamic ComboBox problem -- help me plz

    I use a ComboBox in the stage which named comboCat¡Athen the AS in the frame is:

    // -----------------------------------
    // load file data
    function loadVars() {
    filesVars = new LoadVars();
    filesVars.load("data.txt", filesVars, "POST");
    filesVars.onLoad = function(success) {
    if (success) {
    for (i=0; i<filesVars.category; i++) {
    comboCat.addItem(filesVars["category"+i], filesVars["category"+i]);
    }
    }
    };
    }


    And in the data.txt, the script is:

    &category=2&br=
    &category0=Victor Harbour&br=
    &category1=Sea&br=



    I am sure the codes are wrong, in fact I don't know what I write, I lost in AS.
    How to write them to show "Victor Harbour", and "Sea" in the comboBox.
    Can anyone help me?
    Last edited by ericaso; 09-25-2004 at 10:38 PM.
    Erica So

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center