How to hide certain items in a Combo Box


i've 2 combo box(cb). first cb contain 4 items(drop-down menus) , 2nd cb contain 12 items.

i want when select 1 of items combo box1, 4 out of 12 items combo box2 should visible. want first combo box act filter. done using as3 code.

one way can see create 3 instances of 2nd combo box(each containing 4 items) , based on choices selected in first cb 1 out of 3 instances of 2nd combo box visible. i've used following code , it's working fine. 1st cb cbheight, 2nd cbweight.

 

 

cbweight2.visible = false;
cbweight3.visible = false;

 

function heightselected(evt:event):void
{
    cbweight.visible = false;
    cbweight2.visible = false;
    cbweight3.visible = false;
    if (evt.target.selectedindex == 1)
    {
        cbweight.visible = true;
    }
    else if (evt.target.selectedindex == 2)
    {
        cbweight2.visible = true;
    }
    else if (evt.target.selectedindex == 3)
    {
        cbweight3.visible = true;
    }
}
cbheight.addeventlistener(event.change, heightselected);

 

 

 

but wanted work using 1 instances of 2nd cb. me out.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい