A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] Instant Quote ComboBox HELP!

  1. #1
    Jenla83
    Join Date
    Sep 2007
    Posts
    4

    [F8] Instant Quote ComboBox HELP!

    Using the simple calculator setup, I am creating a quoting engine by using (and) with each field to come up with the answers. Thats not my problem, it works fine. But then I tried adding a combo box so you dont have to type in the information. But some reason when I push the quote button it doesnt read the text from the combo box. So i tried a normal input box again, it worked. I cant figure out how to make the combo box work with the simple calcular actionscript. Which has all the Actionscript on the "quote" button.

    I can send the file if needed ... its just my testing file.
    Attached Images Attached Images

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    this might get you started
    PHP Code:
    // arrays of labels and data
    arrLabel = ["Select","Heart Attack","Angina","Flu","Cold","Sprain"];
    arrData = [0,10,8,6,4,2];

    // populate the combobox - instance name - combo
    for(var j=0j<arrLabel.lengthj++){
    combo.addItem({label:arrLabel[j], data:arrData[j]});
    }    

    obj = new Object();
    obj.change = function(comp){
    lab comp.target.selectedItem.label;
    dat comp.target.selectedItem.data;
    };
        
    combo.addEventListener ("change"obj);

    // button- instance name - quote_btn
    quote_btn.onRelease = function(){ 
    trace(lab);
    trace(dat);
    }; 
    hth

  3. #3
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    I have uploaded a test file to my server for you

    http://www.jackleaman.co.uk/temp/Tester01.zip

  4. #4
    Jenla83
    Join Date
    Sep 2007
    Posts
    4

    Thanks

    You are sooooooooo helpful thanks

  5. #5
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    you're welcome
    good luck

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