flex 4 swfloader: SWFLoader.content.stage.width 和 height 返回主舞台的宽度和高度
当我使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个常见的错误,使用
stage.stageWidth
和stage.stageHeight
。This is a common mistake, Use
stage.stageWidth
andstage.stageHeight
.