翻滚和鼠标悬停有什么区别? [英] what is the difference between roll over and mouse over?

查看:26
本文介绍了翻滚和鼠标悬停有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 flex 中,鼠标悬停和鼠标悬停有什么区别?

In flex what is the difference between rollover and mouseover?

它首先发生翻转,然后是鼠标悬停,然后是鼠标移出,然后是卷出.这些活动什么时候最合适?

it occurs first rollover, then mouseover,then mouseout, then rollout. when these events most suitable?

推荐答案

来自 AS3 文档:

每次鼠标进入显示对象容器的任何子对象的区域时都会调度 mouseOver 事件,即使鼠标已经在显示对象容器的另一个子对象上也是如此.这与 rollOver 事件的目的不同,后者是为了简化带有子项的显示对象容器的 rollout 行为的编码.当鼠标从不是其子项之一的对象进入显示对象的区域或其任何子项的区域时,显示对象将调度 rollOver 事件.rollOver 事件沿着对象的父链连续调度,从不是相关对象的根也不是祖先的最高父级开始,以对象结束.

The mouseOver event is dispatched each time the mouse enters the area of any child object of the display object container, even if the mouse was already over another child object of the display object container. This is different behavior than the purpose of the rollOver event, which is to simplify the coding of rollout behaviors for display object containers with children. When the mouse enters the area of a display object or the area of any of its children from an object that is not one of its children, the display object dispatches the rollOver event. The rollOver events are dispatched consecutively down the parent chain of the object, starting with the highest parent that is neither the root nor an ancestor of the relatedObject and ending with the object.

这篇关于翻滚和鼠标悬停有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆