A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to use list/menu component

  1. #1

    How to populate comboBox with dynamic data

    Now that I have sendAndLoad working properly with my LoadVars object, and I am communicating with my database, I need to populate some lists/menus with data from the database.

    Can someone point me in the right direction on how to use Flash components to make a simple list/menu ? when I say list/menu I mean essentially the functional equivalent of :

    <select name="Days" id="Days">
    <option value="0">Sunday</option>
    <option value="1">Monday</option>
    <option value="2">Tuesday</option>

    I have done several searches online, and found entire sections of websites devoted to it like this: http://www.adobe.com/devnet/flash/ar...omponents.html
    and this:

    But those are very obtuse and far too broad for what I'm trying to do. I need a simple example of how it works and then I can build and learn from there.

    Last edited by nmuta; 08-04-2008 at 12:10 PM. Reason: clarification of question

  2. #2
    I should be more clear...... I am going to be using the ComboBox component, and I can see how to use it in the context of static variables, but I need to know how to populate this comboBox with my data that I'm pulling from the database.

  3. #3
    OK I found the answer: here it is:

    PHP Code:
    import fl.controls.ComboBox;
    import fl.data.DataProvider;

    myVariable:String "Jim Smith";
    myVariable2:Number 100;

    questions:Array = new Array(
    label:"Your High Schools name?"data:"West High"}


    userQuestion.dropdownWidth 210;
    userQuestion.prompt "Pick Your question";
    userQuestion.dataProvider = new DataProvider(questions); 
    Last edited by nmuta; 08-04-2008 at 12:33 PM.

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