Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-17-2008, 12:02 PM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default How to use autoupdate in as

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);
}
what am i doing wrong or, not doing at all ?
Reply With Quote
  #2 (permalink)  
Old 04-21-2008, 03:56 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: How to use autoupdate in as

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.
Reply With Quote
  #3 (permalink)  
Old 05-07-2008, 04:39 PM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: How to use autoupdate in as

How exactly do i do that in Pro ??

Ive now tested out as many ways as i can think of but neighter of them worked
Reply With Quote
  #4 (permalink)  
Old 05-07-2008, 05:33 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: How to use autoupdate 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*);
Second, calling them from within as2

Code:
ExternalInterface.call("AutoUpdate_UICheck", "http://www.mysite.com/updata/update.ini", "My Application");
Reply With Quote
  #5 (permalink)  
Old 05-08-2008, 01:17 AM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: How to use autoupdate in as

Sorry, didnt work here
Reply With Quote
  #6 (permalink)  
Old 05-08-2008, 02:44 AM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: How to use autoupdate in as

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;
and then in as2
Code:
ExternalInterface.call("myFunc");
but as you can see, this dosent work as i thought

how can i get it to work ?
Reply With Quote
  #7 (permalink)  
Old 05-09-2008, 03:12 AM
Senior Member
 
Join Date: Jan 2008
Posts: 123
Default Re: How to use autoupdate in as

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);
then i use FSCommand("FFish_Run", "update"); in as2

working like a charm
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:10 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.