阅读简单的INI文件,AS3 [英] reading simple INI file with AS3

查看:405
本文介绍了阅读简单的INI文件,AS3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该使用什么AS3类来读取一个简单的属性/ ini文件到内存配置一些设置,如颜色容易项目。

What AS3 class should I use to read a simple property/ini file into memory to configure some settings such as colors easily for the project.

格式可以是

key=value <newline>

我喜欢用这种API的访问:跟踪(Settings.get(钥匙))

I like to access it with this kind of API: trace ( Settings.get("key") )

推荐答案

有没有内置的方式做到这一点在AS3,但我们有装载和解析属性文件的支持Spring动作。

There is no built-in way to do this in AS3, but we have support for loading and parsing properties files in Spring ActionScript.

下面是直接链接到源:

  • <一个href="https://fisheye.springframework.org/browse/~raw,r=184/se-springactionscript-as/spring-actionscript/trunk/core/src/main/actionscript/org/springextensions/actionscript/collections/Properties.as"相对=nofollow>属性
  • <一个href="https://fisheye.springframework.org/browse/~raw,r=163/se-springactionscript-as/spring-actionscript/trunk/core/src/main/actionscript/org/springextensions/actionscript/collections/PropertiesParser.as"相对=nofollow> PropertiesParser (内部使用的属性)
  • Properties
  • PropertiesParser (used internally in Properties)

这篇关于阅读简单的INI文件,AS3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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