Flash:实例名称中允许使用哪些字符?
Flash 告诉我实例名称必须包含“字母数字字符、受支持的符号,并且没有空格”。我发现允许使用下划线,但不允许使用减号。
有人有所有受支持符号的明确列表吗?
Flash tells me that instance names must contain "alphanumeric characters, supported symbols, and no whitespace". I've found the underscore is allowed, but not the minus sign.
Does anyone have a definitive list of all supported symbols?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
引用 Adobe Livedocs
Quoting Adobe Livedocs
我没有这样的列表,但我建议您使用驼峰命名法来命名实例。让单词以普通字母开头,每当有新单词开始时,请以大写形式键入该单词的第一个字母,如下所示:thisIsAnExample。
我认为只允许使用下划线,因为所有其他符号都是为闪存本身保留的(-+*/%用于计算,&|=!<>用于逻辑,.用于属性,所以我猜这是您在实例名称中使用的大部分符号)。
编辑:@和\也被保留,所以这些符号也不能使用:)
i don't have such a list, but I suggest that you use camelCase for naming instances. Have the word start with a normal letter and whenever a new word starts, type the first letter of the word in a capital, like this: thisIsAnExample.
and i think only the underscore is allowed, since all the other signs are reserved for flash itself (-+*/% are for calculations, &|=!<> are for logic, . is for properties, so I guess that's most of the signs you would use in an instance-name).
edit: @ and \ are also reserved, so these signs can't be used aswell :)
az、AZ、0-9 和 _ 应该足以命名您需要的任何变量或实例(但我认为您不能以数字开头名称)。任何其他符号都会开始使您的代码不可读。
对于命名约定,有很多可供选择。 Wiki 文章对此提供了很好的信息: http://en.wikipedia.org/wiki/Naming_conventions_(编程)
a-z, A-Z, 0-9 and _ should suffice to name any variable or instance you need to (I don't think you can start a name with a number though). Any other symbols would start to make your code unreadable.
For naming conventions, there are a lot you can chose from. The Wiki article gives good info on this: http://en.wikipedia.org/wiki/Naming_conventions_(programming)