动态加载XML配置文件到FLEX4 / Flash动画在运行时的最佳方式是什么? [英] Best way to dynamically load an xml configuration file into a Flex4/Flash movie at runtime?

查看:166
本文介绍了动态加载XML配置文件到FLEX4 / Flash动画在运行时的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于装载在运行时在SWF一个XML文件,而简单的问题。

I've got a rather simple question about loading in an xml file at runtime in a SWF.

我发现了几个不同的方法在XML加载。

I've found a couple different methods to load in the xml.

  • myXml.load(file.xml);
  • HTTPService对象
  • URLStream对象

什么是更好的方式来加载总是具有相同的名称和位于同一文件夹作为Web服务器?

What is better way to load an xml file that always has the same name and is located in the same folder as the SWF on the web server?

推荐答案

我会用的的URLLoader - 我认为这是最轻量级的。

I would use URLLoader - I think that's the most lightweight one.

  • 的复杂性 URLStream 是不必要的,因为只要一个配置文件而言。
  • 的HTTPService 又是沉重了这个简单的任务(和Flex只)。当然,它可以让你逃脱最低code,我却用它仅适用于一些需要进行多次更新(绑定的lastResult 来活的DataGrid 等)。
  • myXml.load() - ?这不是AS3,是它
  • The complexity of URLStream is unnecessary as far as a configuration file is concerned.
  • HTTPService again is heavy for this simple task (and Flex only). Of course, it allows you to get away with minimum code, but I use it only for something that needs to be updated repeatedly (binding the lastResult to a live DataGrid etc).
  • myXml.load() - this is not AS3, is it?

这篇关于动态加载XML配置文件到FLEX4 / Flash动画在运行时的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆