flex组件 例如image linkbutton等怎么设置凹下去
1个回答
展开全部
extends下linkbutton....;
//鼠标悬浮在字上
override protected function rollOverHandler(event:MouseEvent):void
{
super.rollOverHandler(event);
super.setStyle("textDecoration","underline");//显示下划线
super.setStyle('textRollOverColor','#FF0000');//设置鼠标滑过时的字体颜色
}
//鼠标按下
override protected function mouseDownHandler(event:MouseEvent):void
{
super.mouseDownHandler(event);
super.setStyle('textDecoration','underline');
super.setStyle('textRollOverColor','#0000FF');
super.setStyle('textSelectedColor','#00000FF');//设置被选中时的字体颜色
}
//鼠标抬起
override protected function mouseUpHandler(event:MouseEvent):void
{
super.mouseUpHandler(event);
//super.setStyle("color","#bc11c2");//鼠标抬起后更改字体颜色,表示已经点击过
}
//鼠标移出
override protected function rollOutHandler(event:MouseEvent):void
{
super.rollOutHandler(event);
super.setStyle("textDecoration","underline");//显示下划线
super.setStyle('textRollOverColor','#0000FF');
}
重些实现下以上方法..设置相关样式就可以了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询