Searching for Application Updates with Flash AS2

by Nathan 1. August 2011 09:29

 

I am in the progress of developing a system to update Flash applications made with Zinc when a new version is available. Here is a code snippet to show how it is done.

 

var CurrentVersion = "1.01";
var XmlFile:String = "updateVersion.xml"; var _xml:XML = new XML(); _xml.ignoreWhite = true; _xml.onLoad = function(success):Void{ if(success){ // file found:

// Get Value from xml and compare to current version
if(NewVersion > CurrentVersion) {
// Display Message or link to new version
}

 }else{ //Can't find file (possibly no connection) } } _xml.load(XmlFile)

Tags: ,

General

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen