1、错误描述
TypeError: Error #1034: 强制转换类型失败:无法将 flash.events::MouseEvent@73b7cc1 转换为 mx.events.ItemClickEvent。
2、错误原因
/** * 查询按钮点击函数 */ protected function search_clickHandler(event:MouseEvent):void { search.addEventListener(MouseEvent.CLICK,radiogroup_itemClickHandler); } /** * 单选按钮点击函数 */ protected function radiogroup_itemClickHandler(event:ItemClickEvent):void { if(event.currentTarget.selectedValue=="苹果") { apple.visible = true; banana.visible = false; appleRate.visible = true; } else if(event.currentTarget.selectedValue=="香蕉") { apple.visible = false; banana.visible = true; appleRate.visible = false; } }
事件转换错误
TypeError: Error #1034: 强制转换类型失败:无法将 flash.events::MouseEvent@73b7cc1 转换为 mx.events.ItemClickEvent。
原文地址:http://blog.csdn.net/you23hai45/article/details/40026709