如何最好地将 AS1/AS2 应用程序转换为 ActionScript3 应用程序?
我有一个由多个 SWF 组成的程序。 AS2-SWF 加载一堆 AS1-SWF。 这是一个蹩脚的程序。 我想在 MXML 中指定 GUI,并可能将一些代码重构为 AS3。 但是,将所有 300 多个符号转换为 AS3 或其他符号是不可撤销的。
转换为 AS3/Flex/MXML 时有哪些选择? 该应用程序非常简单,只是也很大。 它仅由按钮、背景和注意文本组成。 所有按钮文本都在 XML 文件中。
我想尽快将其转换为漂亮的代码,但也可以控制,以便代码变得:
- 易于更新/可维护,
- 可读
- 可学习(这样我就可以让只能编写 AS3 甚至 MXML 脚本的人完成更新)。
当然,这是我主动做的,如果超过一周,我就抽不出时间了。
问候, 尤尔根
I have a program consisting of multiple SWF's. An AS2-SWF loads a bunch of AS1-SWFs.
It's a crappy program. I'd like to specify the GUI in MXML and perhaps refactor some code to AS3. However, converting all of the 300+ symbols to AS3 or whatever is undoable.
What are my options in converting to AS3/Flex/MXML? The app is very simple, only also quite large. It consists only of buttons, backgrounds and attention-texts. All the button texts are in XML files.
I want to turn this into pretty code ASAP but also controlled so the code becomes:
- easily updateable/maintainable,
- readable
- learnable (so I can have the updating done by someone that can only script AS3 or even MXML).
Of course doing this is on my own initiative, if it'll take more than a week, I won't be able to find the time.
Regards, Jurgen
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能会有所帮助:
http:// /flexman.info/2009/03/29/as3converter-an-ant-task-small-collection-of-as3/
主要针对AS2代码,所以FLA编辑是不可能的。 但你当然应该看看 JSFL。
有一些非常好的脚本已经可以处理这样的事情:
http://bumpslide.com/blog/2009/03/07/jsfl-class-generator/
This might help:
http://flexman.info/2009/03/29/as3converter-an-ant-task-small-collection-of-as3/
It's mainly for AS2 code, so FLA editing is out of the question. But you should certainly look into JSFL.
There are some pretty good scripts out there already dealing with something like this:
http://bumpslide.com/blog/2009/03/07/jsfl-class-generator/
尤尔根,我同情你……听起来工作量很大。
您有什么问题? 所有的 swf 都可以被视为不同的类吗? 逻辑上是否有很多重叠,或者每个对象都有特定的作用吗?
我认为拥有如此多不同的 SWF 可能会导致范围界定问题> 哪个 SWF 与哪个对话。 您也许可以使用 as3 设置一些使用现有部件的东西,然后尝试在现有代码上创建一个外观 > 使用 swf 中的现有逻辑并通过 mxml 完成可视部分。 除此之外,我所能建议的就是重建。 如果您缺少一些原始 fla,您可能会发现自己也需要 swf 反编译器
Jurgen, I feel for you... it sounds like a lot of work.
What sorts of issues do you have? are all the swfs treatable as different classes? is there much overlap in the logic or does each object have a specific role?
I think having so many different SWFs may possibly lead to scoping problems> which swf talks to which. you may be able to set up something with as3 that uses the existing parts and then try making a facade over the existing code > use the existing logic in the swfs and do the visual part through mxml. other than that, all I can advise is a rebuild. you might find yourself in need of a swf decompiler too if you are missing some of the original fla's