使用 ActionScript3 添加滚动条

发布于 2024-10-07 21:44:34 字数 287 浏览 6 评论 0原文

添加默认的 Spark.components.VScrollBar 滚动条时遇到一些问题。我所做的就是创建一个新的 VScrollBar,设置它的坐标、宽度和高度并执行 addChild,但它没有显示。我还添加了其他确实出现在相同代码中的组件,因此这不应该成为问题。

我可能会缺少什么?

var a:VScrollBar = new VScrollBar();
a.x = 100;
a.y = 100;
a.height = 500;
a.width = 100;
addChild(a);

Having some problems adding the default spark.components.VScrollBar scrollbar. All I'm doing is creating a new VScrollBar, setting it's coordinates, a width and height and doing an addChild but it's not showing up. I'm adding other components too that do show up in the same code so that shouldn't not be the problem.

What might I be missing?

var a:VScrollBar = new VScrollBar();
a.x = 100;
a.y = 100;
a.height = 500;
a.width = 100;
addChild(a);

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

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

发布评论

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

评论(1

放手` 2024-10-14 21:44:34

我认为你应该定义 视口属性

i think you should define the viewport property

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