flex 4 swfloader: SWFLoader.content.stage.width 和 height 返回主舞台的宽度和高度

发布于 2024-09-10 18:49:11 字数 161 浏览 15 评论 0原文

当我使用 SWFLoader 加载 Flash 应用程序时,加载的应用程序的舞台宽度和高度将成为主 Flex 应用程序的舞台。因此,如果我创建一个使用舞台宽度和高度来计算绘制位置的游戏,它实际上会在加载的应用程序舞台的边界之外绘制,因为它获取整个屏幕的宽度和高度。我该如何解决这个问题?

谢谢

When I load a flash application using SWFLoader, the Stage width and height of the loaded application becomes the stage of the main flex application. so if i created a game that uses stage width and height to calculate where to draw, it actually draws outside of the bounds of the loaded application stage because it gets the width and height of the entire screen. how can i resolve this issue?

thanks

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

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

发布评论

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

评论(1

手心的温暖 2024-09-17 18:49:11

这是一个常见的错误,使用stage.stageWidthstage.stageHeight

This is a common mistake, Use stage.stageWidth and stage.stageHeight.

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