A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Combo Trouble

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    2

    Question Combo Trouble

    Hi Everyone. Please can someone help me with this issue. To explain I have two component combo boxes on one frame. What I want to do is on dropdown selection have the selection direct you to a frame in the movie. I have this working for one combobox, but as I understand you cannot have two functions of the same name. If I put the two combo boxes on the stage they dont work. Below is the code that works if you only have one combo box at a time on the stage. I'm not sure how to join this code together so they both work independantly.

    Just to confirm the set-up.

    I have several frames each with a stop() code. Each frame has an label name which corresponds to the data value in the corresponding combobox. On selection of an item from the combobox it should advance and stop at the relevant frame.




    ----ComboBobx1-----
    initData();

    function onSelect() {

    gotoAndStop(dropdownIN.getSelectedItem().data);

    } listenerObject = new Object();

    listenerObject.change = function(eventObject) {

    getURL(eventObject.target.value);

    }

    dropdownIN.addEventListener("change" , listenerObject)

    ;

    ----ComboBobx2-----

    initData1();

    function onSelect() {

    gotoAndStop(dropdownIN2.getSelectedItem().data);

    } listenerObject = new Object();

    listenerObject.change = function(eventObject){

    getURL(eventObject.target.value);

    }

    dropdownIN2.addEventListener("change2" , listenerObject) ;

  2. #2
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Post the FLA. You should put different instance names to your combo boxes so they act independent.

Tags for this Thread

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