AIR installer
Flash Platform/AIR / 2007/07/02 21:53
producter = new _global.System.Product("airappinstaller");
if (!producter.isInstalled()) {
producter = new _global.System.Product("airinstaller1x0xm4");
producter.download();
}
producter.onStatus = function(info) {
if (info.code == "Download.Complete") {
txt.text = "download success.";
if (producter.launch()) txt.text = "launch success.";
else txt.text = "launch failed.";
} else txt.text = "download failed.";
};
airurl = "http://download.macromedia.com/pub/labs/air/sample_apps/b1/ScreenPlay.air";
localconnect = new LocalConnection();
btn.onRelease = btn.onReleaseOutside = function(){
producter = new _global.System.Product("airappinstaller");
if (producter.isInstalled()) {
i = 0;
producter.launch();
dointerval = setInterval(init, 500);
}
};
function init() {
i ++;
if( i > 10) clearInterval(dointerval);
localconnect.send("runtime#:air", "installFromBadge", airurl);
}
if (!producter.isInstalled()) {
producter = new _global.System.Product("airinstaller1x0xm4");
producter.download();
}
producter.onStatus = function(info) {
if (info.code == "Download.Complete") {
txt.text = "download success.";
if (producter.launch()) txt.text = "launch success.";
else txt.text = "launch failed.";
} else txt.text = "download failed.";
};
airurl = "http://download.macromedia.com/pub/labs/air/sample_apps/b1/ScreenPlay.air";
localconnect = new LocalConnection();
btn.onRelease = btn.onReleaseOutside = function(){
producter = new _global.System.Product("airappinstaller");
if (producter.isInstalled()) {
i = 0;
producter.launch();
dointerval = setInterval(init, 500);
}
};
function init() {
i ++;
if( i > 10) clearInterval(dointerval);
localconnect.send("runtime#:air", "installFromBadge", airurl);
}


댓글을 달아 주세요