A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: combo box item selection

  1. #1
    I Just Started Flash Today johnglynn's Avatar
    Join Date
    Mar 2001
    Posts
    180

    combo box item selection

    Hi,

    I have a combo box. I want to have diffrent things happen depending on what is clicked. This is the direction I am going in buty no luck




    function changeHandler(){
    if(my_cb.getValue=="some particular selected item"){
    gotoAndStop(1);
    }else{
    gotoAndPlay(2);
    }
    }

    How do I denote which item has been selected in the combo box? .getValue is not working in the if statment.

    Thanks

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Posts
    135

    try this

    I tried an effect on a sample file
    I have one text box instance "myTextBox", and a combo box, "myComboBox". The data values inside "1","2", "3" for the display values 'one', 'two', 'three'

    --------actionscript code--------
    function myFunction (){
    myTextBox.text=myComboBox.getValue();
    }
    myComboBox.setChangeHandler("myFunction");

    stop();
    --------actionscript code--------

  3. #3
    I Just Started Flash Today johnglynn's Avatar
    Join Date
    Mar 2001
    Posts
    180

    almost there:)

    Thanks maven5! I am closer no doubt. I made a link to a mockup of what I am trying to do:

    Combo Box Blues

    What do you think?

    Thank you again...

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