;

PDA

Click to See Complete Forum and Search --> : add actions to combo box in flash 8


howps
08-23-2006, 01:29 AM
hi,

i have made a combo box. from the drop down, when user select option 1, option 2 etc.. it will run an action (gotoAndPlay(10) ....)

appreciate it very much for any help rendered.

thanks.

cancerinform
08-23-2006, 07:43 AM
cb.addItem ({label:"1"});
cb.addItem ({label:"2"});
cb.addItem ({label:"3"});
var cbListener:Object = new Object ();
cbListener.change = function (evt_obj:Object):Void
{
_root.gotoAndPlay (cb.selectedItem.label);
};
cb.addEventListener ("change", cbListener);