Where to keep a Init.xml and Config.as file ?

vishwas.gagrani's Avatar


20 Oct, 2012 05:40 AM

I have an init.xml file. That is used by Config.as file. ( Init.xml and Config.as are later on loaded by StatsModel ) . Both the files ( init.xml and Config.as) contain the "screen-messages". Difference is that some are good to be allowed for the user to modify it, while some others are good for the programmer only to modify it.

For example :
User can modify, the background skin or say fonts used etc.
While programmer may modify the in-application messages like error-messages, server-file-locations etc.

Right now i keep both the files Init.xml and Config.as besides the "main" swf generated. The reason is it's very handy to make all such changes in one go.

My query is, does keeping the files ( especially Config.as ) besides the main.swf seem to be ok ? Or there is some better place to keep it following the MVC ?


  1. Support Staff 1 Posted by Ondina D.F. on 20 Oct, 2012 08:18 AM

    Ondina D.F.'s Avatar

    My take on this:

    Init.xml file is an external resource. A service (InitService) loads it and passes the (parsed) xml on to a Model or other class that needs it.

    I’d put Init.xml under a folder ‚resources/data’ or 'resources/config' and Config.as under ‚models’ or under ‚config’ together with the RobotlegsConfig.as (context configuration), depending on what exactly the Config.as is supposed to do.

    The names of the folders are up to you.


    --------data (or config)








    --------------RobotlegsConfig.as (context configuration)









  2. Ondina D.F. closed this discussion on 23 Oct, 2012 10:43 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac