在动作脚本中通过鼠标悬停位置滚动 ScrollPane 的最佳方法?

发布于 2024-07-07 23:53:19 字数 72 浏览 5 评论 0原文

当鼠标接近滚动窗格的顶部边缘时,它会向上滚动直到到达顶部,只有当鼠标离开顶部边缘区域时才会中断。

底边也一样。

When mouse nears top edge of scrollpane, it scrolls up until it reaches the top only interrupted if the mouse leaves the top edge area.

Same for bottom edge.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不再见 2024-07-14 23:53:19

您需要创建一个可以在其上编写 AS 代码的符号,该符号不可见(将 alpha 设置为 0)并且位于您希望发生所需行为的区域。

确保

鼠标悬停时它是一个按钮符号,作为您告诉窗格滚动的隐藏符号。
在隐藏符号的鼠标移开上,您告诉窗格停止滚动。

将隐藏符号放在比滚动窗格更高的层上。

You need to make a symbol that you can write AS code on that is invisible (set alpha to 0) and lies in the area you want to have the desired behavior to occur.

make sure its a button symbol

on the mouseover for your hidden symbol you tell your pane to scroll.
on the mouseout for your hidden symbol you tell your pane to stop scrolling.

Keep your hidden symbols on a higher layer than your scroll pane.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文