无形的 Flash 文本字段
我目前正在尝试模仿 Flash 游戏的屏幕,以达到我自己难以理解的目的,并且相关屏幕的典型屏幕截图看起来像这样
。我已成功找到并提取背景图像
从文件中,现在我试图找出各个文本字段的位置。 SWF 的动作脚本具有这样声明的各种文本字段:
public var speedText:TextField;
public var exp:TextField;
public var evadeText:TextField;
public var lvl:TextField;
public var critText:TextField;
我遇到的问题是,我在代码中找不到任何实际将 x、y、宽度或高度属性分配给任何文本字段的实例,他们也没有在舞台上使用Flash CS4,所以我根本无法确定他们的位置。我已经搜索了与 swf 关联的所有动作脚本文件以查找文本字段名称的任何实例,除了向它们分配文本之外没有任何命中。如果他们没有通过动作脚本接收定位属性,他们如何接收这些值,以及如何获取它们?
I'm currently trying to mimic a screen from a flash game for my own inscrutable purposes, and a typical screenshot of the screen in question looks something like this
. I've successfully found and extracted the background image
from the file, and now I'm trying to find out the positioning of the various text fields. The actionscript for the SWF has the various textfields being declared as such:
public var speedText:TextField;
public var exp:TextField;
public var evadeText:TextField;
public var lvl:TextField;
public var critText:TextField;
The problem I have is that I can't find any instance anywhere in the code that actually assigns x, y, width, or height attributes to any of the text fields, nor are they anywhere on the stage using Flash CS4, so I can't determine their positioning at all. I've searched all actionscript files associated with the swf for any instance of the textfield names, without any hits except for assigning text to them. If they aren't receiving their positioning attributes via actionscript, how are they receiving these values, and how can I obtain them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Loader-Instance 加载 swf,然后您可以循环遍历其子级并跟踪位置:
load the swf with a Loader-Instance, then you can loop through its children and trace the positions: