wmode=“不透明”导致按下鼠标并离开舞台后文本区域上的选择行为异常
我在 flash 10 cs5 as3 中使用 textarea。问题是当我尝试选择文本并离开舞台并离开鼠标然后再次将鼠标移动到文本上时,选择的文本将随鼠标移动。
造成这种情况的原因如下:
* click somewhere on the text and drag the mouse in order to select the text
* then go out of the swf
* leave the mouse
* now move mouse on textarea
->选择的文本将随鼠标移动...
如何停止这种行为???
我尝试在舞台上实现 mouseleave,但问题是当按下鼠标并离开舞台时,我无法检测到 mouseleave 事件。
这是因为 wmode="opaque" 参数。我发现当 wmode="window" 时它不会执行此操作。有解决办法吗?
I m using textarea in flash 10 cs5 as3. The problem is when i try to select a text and go out of stage and leave the mouse then again move mouse on text then selection of text will move with the mouse.
Here is what causes that:
* click somewhere on the text and drag the mouse in order to select the text
* then go out of the swf
* leave the mouse
* now move mouse on textarea
-> the selection of text will move with the mouse...
How to stop this behavior????
I tried to implement mouseleave on stage but the problem is i m not able to detect mouseleave event when mouse is pressed and it leaves the stage.
This is because of wmode="opaque" parameter. I found out that it doesn't do this when wmode="window". Is there a solution for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 TLF TextField 并且事件附加到 TextField 并且 a 是 TextField 的名称,则尝试此代码
IF you are using TLF TextField and events are attached to TextField and a is the name of the TextField then try this code