Actionscript 3 flex mobile的下拉列表。以编程方式检测用户按下的位置并设置selectedItem

Actionscript 3 flex mobile的下拉列表。以编程方式检测用户按下的位置并设置selectedItem,actionscript-3,apache-flex,flash-builder,Actionscript 3,Apache Flex,Flash Builder,我正在尝试使用Flex Mobile上的下拉列表。现在,我知道技术上你不应该在Flex Mobile项目中使用它。Adobe不鼓励使用它,但我的应用程序需要它。这是我试过的- <s:DropDownList id="industry" width="160" height="35" change="onDropDownChange(event)" click="onDropDownClick(event)"/

我正在尝试使用Flex Mobile上的下拉列表。现在,我知道技术上你不应该在Flex Mobile项目中使用它。Adobe不鼓励使用它,但我的应用程序需要它。这是我试过的-

    <s:DropDownList id="industry" width="160" height="35"
                                    change="onDropDownChange(event)"  click="onDropDownClick(event)"/>



protected function onDropDownIndexChange(event:IndexChangeEvent):void
                {   //removeEventListener(event:IndexChangeEvent);
                    industry.selectedIndex =industry.selectedItem;
                }

protected function onDropDownClick(event:Event):void {
                    industry.openDropDown();
                    //industry.selectedItem=industry.selectedIndex ;
                    industry.addEventListener(IndexChangeEvent.CHANGE, onDropDownIndexChange );
                }

protected function onDropDownChange(event:IndexChangeEvent):void {


                trace(industry.selectedIndex);
                trace(industry.selectedItem);
                event.target.listData = industry.selectedItem;
}

受保护函数onDropDownIndexChange(事件:IndexChangeEvent):void
{//removeEventListener(事件:IndexChangeEvent);
industry.selectedIndex=industry.selectedItem;
}
受保护函数onDropDownClick(事件:事件):无效{
industry.openDropDown();
//industry.selectedItem=industry.selectedIndex;
industry.addEventListener(IndexChangeEvent.CHANGE,onDropDownIndexChange);
}
受保护函数onDropDownChange(事件:IndexChangeEvent):无效{
跟踪(行业选择索引);
trace(industry.selectedItem);
event.target.listData=industry.selectedItem;
}

我无法在下拉菜单上注册单击。我不知道如何检测菜单上的触摸(或点击)事件来设置它。感谢您的阅读和帮助。

冒着听起来自我放纵的风险;使用。这是免费的生产使用(但如果你想获得资源或帮助,你必须付费)

这是我们的。我们有一些不同的渲染器和皮肤。为了使下拉菜单看起来像一个标准的移动下拉菜单,我们建议使用单选按钮渲染器和我们的弹出式皮肤2


Flex的默认下拉列表存在触摸交互问题,尤其是在下拉列表中单击时。要创建自己的版本,您必须解决这些问题。我们创建了一组自定义皮肤,并添加了一些额外的属性/样式

谢谢你的帮助。。我会调查的。