flex - How to read from AIR manifest file within AS / MXML code -


flash builder generated appname-app.xml descriptor every air project. there number of settings, values there, including below. possible read these in code without explicitly loading xml @ runtime (even don't know if it's possible)? maybe loader.info or similar?

<!-- name displayed in air application installer.           may have multiple values each language. see samples or xsd schema file. optional. -->     <name>ffff</name>      <!-- string value of format <0-999>.<0-999>.<0-999> represents application version can used check application upgrade.      values can 1-part or 2-part. not necessary have 3-part value.     updated version of application must have versionnumber value higher previous version. required namespace >= 2.5 . -->     <versionnumber>1</versionnumber>       <!-- description, displayed in air application installer.          may have multiple values each language. see samples or xsd schema file. optional. -->     <!-- <description></description> -->      <!-- copyright information. optional -->     <!-- <copyright></copyright> -->  

what trying read called "application descriptor".

it xml, easy read:

var appxml:xml = nativeapplication.nativeapplication.applicationdescriptor;  namespace ns = "http://ns.adobe.com/air/application/2.5"; use namespace ns;  alert.show("appid: " + appxml.id); alert.show("version: " + appxml.versionnumber); alert.show("filename: " + appxml.filename); 

notice set namespace 1 using. should make sure use namespace defined in root of application descriptor.

good luck!


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -