A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] simple go to frame combobox

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    21

    resolved [RESOLVED] simple go to frame combobox

    Hi, I can't find any examples with the flash 9 combobox, only flash 8. For flash 9, all I need it to do is go to another frame when on change but I'm not calling the function right. I defined the only item in the properties panel, item: stuff1, value: three. I want it to go frame three.
    Code:
    combobox1.onChange = function() {
    	gotoAndStop(value);
    }

  2. #2
    Junior Member
    Join Date
    Apr 2008
    Posts
    21
    I've tried attaching event handlers such as this:
    Code:
    myComboBox.onChange= function() {
        gotoAndStop(myComboBox.selectedItem.value);
        //whero the value of the selected item is the name of the frame
    }
    But the documentation on the combobox is not clear and does not state how to put the functions together. I would appreciate any help.

  3. #3
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    You could try this
    Code:
    myComboBox.addEventListener(Event.CHANGE, myChangeHandler);
    
    function myChangeHandler(e:Event):void {
    	gotoAndStop(myComboBox.list.selectedItem.value);
    }

  4. #4
    Junior Member
    Join Date
    Apr 2008
    Posts
    21
    Before you posted i had this same thing except without the "list" in the gotoandstop. I guess thats why it wasnt working. This works fine. Thank you for your help.

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