Application Version Control in AS3
I thought that I would just write a quick note on how I know which version of an application I am looking at when it has been published to the web. It's all well and good saying its revision 87 from svn but how do you know? Well a simple way is to add it to the Flashplayers custom context menu. Right click to see the custom menu and to view the source
This comprises of making just two files one of which is a singleton class that can be used for every project you want to add version control to and the second is a VersionControl.properties file which you update before you publish a new version of your application lets take a look at that file first
#Each item takes the same params as the ContextMenuItem class #and is seperated by and & ampersand #caption:String = caption Value : String, #separatorBefore:Boolean = false, #enabled:Boolean = true, #visible:Boolean = true #In addition each item supports a url variable just add #&YOUR URL GOES HERE; Version=Version 0.1&false&false&true; url=Developer:A McCormick&false&true&true&www.goeshere.com viewSource=ViewSource&false&true&true&www.goeshere.com
The Second class controls what these properties do i know its a long class but its fully commented. ( right click the grey square above and choose view source to see the VersionController class ).
Basically it loops through the VersionControl.properties file and builds context menu items based on the values, adding the ability to include links as well.
And finally all you have to do is call getInstance( this ); in your main application file.
<!--[CDATA[ import VersionControl.VersionController; ]]-->
@Omnipitence
Applications
Recommended Reading
Blog Roll
Pages
Archives
- December 2011
- November 2011
- October 2011
- August 2011
- April 2011
- March 2011
- February 2011
- December 2010
- November 2010
- July 2010
- June 2010
- May 2010
- April 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- April 2009
- March 2009
- January 2009
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008





July 2nd, 2008 - 10:34
Excellent ! Thank you.
What happens if the “default” context menu is disabled or already fully customized ?
July 7th, 2008 - 13:59
Well you can’t fully disable the context menu in Flash without using some third party scripting, as for fully customized context menu’s i’m not sure..