MXML 如何读取自己的程序,例如 mxml 文件内的函数?
当 mxml 文件中有属性、方法和一些组件时,它如何读取这些行?当方法中有一些语句时(例如,Alert.show('Hellow World')), mxml 首先读取它们,但不执行它们;那么从某个地方调用这个方法之后,就会执行该方法,对吗?
When there is a property, a method, and some components in a mxml file, how does it read these lines? When there is some statements inside a method (e.g., Alert.show ('Hellow World')),
mxml read them first, but do not execute them; then after this method is called from somewhere, then the method is executed, right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当编译器编译 mxml 文件时,它会创建一个中间文件,其中包含从 mxml 生成的 ActionScript。通过将以下内容添加到编译器参数中,您可以准确地看到生成的 ActionScript 的样子:
-keep- generated-actionscript
希望有所帮助。When the compiler compiles an mxml file, it creates an intermediate file that contains ActionScript that has been generated from the mxml. You can see exactly what the generated ActionScript looks like by adding this to your compiler arguments:
-keep-generated-actionscript
Hope that helps.