|
|||
|
ive tried to add autoupdate into my as so its easy to chech for updates from systray menu but id did absolutely nothing,
heres what i used Code:
function updateCheck(){
var autoupdate = Global.getAdditionalFile("AutoUpdate.dll");
ActiveXObject.register(autoupdate);
var pup = new ActiveXObject("AutoUpdate.SWFKitAutoUpdate");
pup.updateINI = "http://Site.com/update.ini";
pup.appName = "Play";
pup.check(true);
}
|
|
|||
|
In as 2, you will have to first create a wrapper class for the activex object before you can access it. Or if you are using swfkit pro, you can first import the dll in "intialize" script, and then call its functions in as.
|
|
|||
|
First, importing the autoupdate functions in the "initialize" script
Code:
var autoupdate = getAdditionalFile("AutoUpdate.dll");
dllimport autoupdate stdcall void AutoUpdate_Check(char*, char*, Boolean);
dllimport autoupdate stdcall void AutoUpdate_UICheck(char*, char*);
Code:
ExternalInterface.call("AutoUpdate_UICheck", "http://www.mysite.com/updata/update.ini", "My Application");
|
|
|||
|
how do i write a function in initialize that then can be called from as2 ??
i thought to use the following in initialize Code:
//Initialize
function myFunc(){
getAdditionalFile();
var autoupdate = getAdditionalFile("AutoUpdate.dll");
ActiveXObject.register(autoupdate);
var ux = new ActiveXObject("AutoUpdate.SWFKitAutoUpdate");
ux.updateINI = "http://mysite.com/update.ini";
ux.appName = "ApplicationName";
ux.check(true);
}
return true;
Code:
ExternalInterface.call("myFunc");
how can i get it to work ? |
|
|||
|
Solved problem by creating new scriptfile (named update) in Scripts and adding this code in there
Code:
var autoupdate = Global.getAdditionalFile("AutoUpdate.dll");
ActiveXObject.register(autoupdate);
var pup = new ActiveXObject("AutoUpdate.SWFKitAutoUpdate");
pup.updateINI = "http://Site.com/update.ini";
pup.appName = "Play";
pup.check(true);
working like a charm |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|