- 浏览: 137672 次
- 性别:
- 来自: 北京
-
文章分类
最新评论
Flex里很多控件的手型鼠标可以用如下方式实现:
buttonMode="true" 或 useHandCursor="true" 或者两个一起。
但是Label和其他一些控件我一直搞不定。
今天终于发现,Label需要设置为:
buttonMode="true" mouseChildren="false"
去帮助里找到了mouseChildren这个属性。大意如下:
mouseChildren这个属性控制的是该控件是否能够让用户通过鼠标来交互,即触发鼠标事件。默认为true。
如果想用自定义的Sprite作为button使用,就可能需要这个属性。因为Sprite中可能会包含其他子控件,为了让该Sprite作为一个整体来响应交互动作,就需要屏蔽其子控件的MouseEvent响应。也就是需要把子控件的mouseChildren=false。
这个属性和Label的关系, 难道说明Label本身是一个特殊的组合的Sprite?
mouseChildren property
mouseChildren:Boolean
[read-write]
Determines whether or not the children of the object are mouse enabled. If an
object is mouse enabled, a user can interact with it by using a mouse. The
default is true
.
This property is useful when you create a button with an instance of the
Sprite class (instead of using the SimpleButton class). When you use a Sprite
instance to create a button, you can choose to decorate the button by using the
addChild()
method to add additional Sprite instances. This process
can cause unexpected behavior with mouse events because the Sprite instances you
add as children can become the target object of a mouse event when you expect
the parent instance to be the target object. To ensure that the parent instance
serves as the target objects for mouse events, you can set the
mouseChildren
property of the parent instance to
false
.
No event is dispatched by setting this property. You must use the
addEventListener()
method to create interactive functionality.
发表评论
-
Flex从swf中加载资源和类
2013-12-10 09:37 775需要为直播播放器做几个新的样式,想将每个样式的布局XML和 ... -
swf加载swf的一些问题
2013-03-20 17:31 7261,swfParent 加载 swfChild,如果有交互, ... -
NetStream appendBytes 一点经验
2013-03-20 16:25 2627最近在做基于 NetStream ... -
【译】HTML5还需要什么才能击败Flash(part 2)
2012-04-01 17:53 0What else does HTML5 need to ... -
【译】HTML5还需要什么才能击败Flash(part 1)
2012-04-01 16:36 1102What else does HTML5 need to de ... -
AS 函数作用域、函数闭包、限界方法
2012-03-30 10:21 1490作用域链(scope chain): 任何时候函数开始 ... -
在AS3中自定义全局方法
2012-03-29 11:17 990http://en.flash-ripper.com/2007 ... -
Flex Class object(类对象)构成、traits和prototype
2012-03-29 10:59 1582先贴张图: 每个矩形代表一个对象。CA代表class ... -
使用flex sdk3.6的asdoc遇到的问题及解决方法
2012-03-26 10:24 1976想要对一个组件项目导出asdoc。组件的sdk是3.6,但使用 ... -
UIComponent添加Image不显示
2012-03-18 17:32 1027在UIComponent中添加Image组件,图片不显示。 ... -
Flex优化技巧
2012-03-30 09:46 912http://www.jb51.net/article/182 ... -
Flex中多个柱状图和折线图的问题
2012-02-28 17:53 2007做了个柱状图和折线图的混合图表,2根3D的柱子,6根折线,遇到 ... -
AdvancedDatagrid的dataprovider属性
2012-02-22 10:15 858高级dataGrid的dataProvider的set方法里并 ... -
Sprite的宽高设置及Flex组件的混淆
2012-02-02 10:23 1708由于Bitmap和InteractiveObject同级,都继 ... -
Flex SDK3.5 PollingChannel.as 存在内存泄露bug的一种解决方法
2011-12-31 15:32 1314bug见前面的一篇文章: http://xltank.ite ... -
TextInput的ErrorString样式
2011-10-25 13:08 911http://blog.minidx.com/2008/05/ ... -
【转】Flash Player的 mm.cfg文件
2011-10-08 17:17 5345http://jpauclair.net/mm-cfg-sec ... -
Flex trace() 保存路径
2011-10-08 17:11 1102http://help.adobe.com/en_US/fle ... -
给ItemRenderer传参
2011-08-18 17:19 1554给ItemRenderer传递初始参数,可以根据参数灵活生成I ... -
AdvancedDatagrid改变行的颜色
2011-08-16 15:25 1641最早我尝试重写AdvancedDatagrid的drawRow ...
相关推荐
为了让鼠标在线条上时显示为手型,我们需要在`myLine`组件上设置`mouseChildren`和`cursor`属性: ```actionscript myLine.mouseChildren = false; // 防止子元素接收鼠标事件 myLine.cursor = "hand"; ``` 4....
技术运维-机房巡检表及巡检说明
第四次算法分析与设计整理
图像处理项目实战
该资源为jaxlib-0.4.18-cp311-cp311-macosx_11_0_arm64.whl,欢迎下载使用哦!
搭建说明. 运行环境 php5.6 mysql5.6 扩展sg11 前置条件: 前后端分离,需要准备两个域名,一个后台域名,一个前端域名 后端源码修改(cs2.ijiuwu.com批量替换改为你的后端域名)数据库修改(cs3.ijiuwu.com批量替换为你的前端域名)1、创建后台站点,上传后台源码并解压到根目录2、创建前端站点,上传前端源码并解压到根目录 3、创建数据库上传并导入数据库文件 4、修改数据库信息: 后台:app/database.php 前端:application/database.php 前端站点设置 伪静态thinkphp 运行目录public 关闭防跨站 访问后台域名/admin.php进入后台管理 admin 123456 系统-》系统设置-》附件设置-》Web服务器URL 改为你的前端域名 系统-》清前台缓存 改为你的前端域名 点击刷新缓存
【毕业答辩】爆款黑板风教育文艺毕业论文答辩通用模板.pptx
1、文件内容:systemd-devel-219-78.el7_9.9.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/systemd-devel-219-78.el7_9.9.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、更多资源/技术支持:公众号禅静编程坊
win32汇编环境,对 WM-MOUSEMOVE 消息的理解
车牌识别项目
UE项目开发过程中的一些快捷脚本
lab1的words.txt文件
python、yolo、pytorch
人工智能、大语言模型相关学习资料
图像处理项目实战
python、yolo、pytorch
车牌识别项目
该资源为jaxlib-0.4.18-cp312-cp312-macosx_10_14_x86_64.whl,欢迎下载使用哦!
python、yolo、pytorch
Swift-IOS TODO_List应用开发