Cédric Tabin
unread,Jan 6, 2009, 3:13:11 PM1/6/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mas...@googlegroups.com
Hello guys,
I just uploaded the last revision of Masapi. The main new feature is the support of dynamic URL. Basically you can now put that kind of URL for a file (format of a variable is '${variableName}' ) :
../myfolder/myfile_${LANG}.txt
and do something like that into your code, in order that masapi automatically replaces your variables :
myFactory.defaultVariables.put("LANG", "en");
As masapi will do the replacement only when the file is loaded, you can change the variable into the factory and relaunch the loading of the files => the URL will be automatically updated. And more interesting, you can use that feature directly into the XML of the dependencies (note that the variables can be also declared into the code) :
<application>
<variables>
<var name="SWF_FOLDER">swf</var>
<var name="DATA_FOLDER">data</var>
<var name="LANG">en</var>
</variables>
<files>
<folder path="${SWF_FOLDER}">
<file name="fonts" url="fonts.swf" global="true" type="swf" />
</folder>
<folder path="${DATA_FOLDER}">
<file name="menuData" url="menu_${LANG}.xml" />
</folder>
</files>
<dependencies>
...
</dependencies>
</application>
Currently the variables are supported only into URL, path folders and url data, but not in other variables.
Best regards,
Cedric Tabin