A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Combo Box Question

  1. #1
    Member
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    36

    Combo Box Question

    I'm importing data via coldfusion and database to a combo box component in flash. My combo box says "loading data" while the info is being retrieved but when it's complete the first item in the box is the first piece of data. How can I make the first piece of data say "select a park from below" and then the data start in the combo box?

  2. #2
    Senior Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    125
    Have you tried something like:

    myComboBox.addItemAt(0, "select a park from below");

    ?

  3. #3
    Member
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    36
    i did try that. after the data loads the first item is shown instead of the text i want.

  4. #4
    Senior Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    125
    Could you show me the code you're using to populate the combo box with the data?

  5. #5
    Member
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    36
    i used a web service connector to connect to the a .cfc file and it gets and array of park types from a database. then i have the results going to a data set component. then they are outputed to the combo box. it's all done with three simple components and no code, really.

  6. #6
    Senior Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    125
    Hmm. I don't know anything about the data set component. But if you just want the combo box to show your message you can use:

    myComboBox.text = "Select a park from below";

    This just changes the textbox part of the combo box. But if your user doesn't actually choose something from the combo box, it will still give you the first item as what's selected. That could be a problem.

    Of course, you can detect whether the user chose something or not by looking at myComboBox.text. If this is still your message, you can write code to let them know they still need to choose something.

  7. #7
    Member
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    36
    thanks for your help. do you know anything about coldfusion and using web service connector? i have one more issue,

  8. #8
    Senior Member
    Join Date
    Jul 2002
    Location
    California
    Posts
    125
    You're welcome. I have a little experience with ColdFusion, but none with web service connector...

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