将鼠标悬停在另一个 Spark 元素上时更改状态
悬停在另一个元素上时如何设置悬停状态(upSkin)? 此示例不适用于 Spark: https://stackoverflow.com/questions/3364244?tab=oldest#tab-top
会喜欢做这样的事情:
<s:Button id="but1"/>
<s:Button label="change" mouseOver="button2_mouseOverHandler(event)"/>
protected function button2_mouseOverHandler(event:MouseEvent):void{
//make but1 look like I'm hovering it
}
How to set a hover state (upSkin) when hover on another element?
This example is not working on spark:
https://stackoverflow.com/questions/3364244?tab=oldest#tab-top
Would like to do something like this:
<s:Button id="but1"/>
<s:Button label="change" mouseOver="button2_mouseOverHandler(event)"/>
protected function button2_mouseOverHandler(event:MouseEvent):void{
//make but1 look like I'm hovering it
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当鼠标悬停在元素 A 上时,你希望元素 B 改变样式吗?为 A 创建事件侦听器(MouseEvent.ROLL_OVER、MouseEvent.ROLL_OUT)。或者什么?
更新:获取皮肤对象并设置四种状态之一:up、over、down、disabled(在skin.states数组中找到):
When mouse is over element A, you want element B to change style? Create event listeners for A (MouseEvent.ROLL_OVER, MouseEvent.ROLL_OUT). Or what?
Update: get skin object and set one of the four states: up, over, down, disabled (found in skin.states array):