Sorry, I misspoke. Don't put it in the package block. It should be inside the class. This is the way to do it:
https://paste.apache.org/P1Qq - Josh On Mon, Mar 20, 2017 at 2:53 PM, Josh Tynjala <joshtynj...@gmail.com> wrote: > I know you can call static functions from inside the package block. Simply > put your loop inside the static function. Here's a simpler example that you > should be able to modify to add your loop: > > https://paste.apache.org/dcVo > > It's certainly possible that FalconJX will mangle this code when emitting > the JS. If that's the case, it's a bug. > > - Josh > > On Mon, Mar 20, 2017 at 2:43 PM, Harbs <harbs.li...@gmail.com> wrote: > >> Is there a good way to initialize static variables? >> >> I have a class which has a large static object and I need to initialize >> about 100 attributes in a loop. It’s actually a class being ported from >> Javascript. In Javascript, it’s pretty easy to do this. You just write the >> loop right after declaring the variable. I’m not sure how to go about it in >> AS though… >> >> (I have a feeling this will be a common problem for code being migrated >> from JS to AS.) >> >> Thoughts? >> Harbs > > >