在Flash中,我将如何运行一个E4X语句时,该语句存储在一个字符串? [英] In Flash, how would I run an e4x statement when that statement is stored in a String?
本文介绍了在Flash中,我将如何运行一个E4X语句时,该语句存储在一个字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以,我有这样的事情:
So I have something like this:
var xmlStatement:String = "xmlObject.node[3].@thisValue";
什么神秘功能,我必须用这样我可以执行xmlStatement并从XmlObject中得到thisValue?像....
What mystery function do I have to use so that I can execute xmlStatement and get thisValue from that xmlObject? Like....
var attribute:String = mysteryFunction(xmlStatement);
P.S。我知道的eval()适用于ACTIONSCRIPT2,我需要的AS3的解决方案。 :)
P.S. I know eval() works for actionscript2, I need the as3 solution. :)
推荐答案
不幸的是,这是不可能在ActionScript 3,但是,这可能是一个解决办法:的 http://blog.betabong.com/2008/09/23/e4x-string-parser/
Unfortunately this is not possible in ActionScript 3. This however might be a solution: http://blog.betabong.com/2008/09/23/e4x-string-parser/
这篇关于在Flash中,我将如何运行一个E4X语句时,该语句存储在一个字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文