January 09, 2008Parsing a nested or name spaced object from a string in ECMAScript

Often times when I am making dynamic scripts in Flash or JavaScript, I want to call an object method using a string. It may be a situation where I am stuck using fscommand (due to a customer request of a Flash version <8) or just writing script with script.

The function is executed somewhat simply by splitting the string at the dots and adding them as subscripts to one another in order. However, there are some other pieces to it that make it a little more friendly to mistakes and general usage.

Read Full Article...

AddThis Social Bookmark Button Posted by Greg Ferrell at 09:37 PM. Filed under: JavaScript • (0) CommentsPermalink