|
|||
|
I have used SWFKit to create a program that generates .swf games - using the swfGen.dll file.
The progam works fine. However, as the program is for teachers and students some users are keen to install it on a network. It seems that the only way to install the program is to have the swfGen.dll installed on each PC. For a network installation this obviously means that each computer has to be installed individually. Is there any way round this?
__________________
:) |
|
|||
|
Try including the SWFgen.dll in the projector's additional files (so it unpacks the dll every time the program is run), then have the following code from this forum topic -- see link below; you may have to tweek it -- in the projector's Initalize script:
http://www.topcmm.com/forum/index.ph...sg2345#msg2345 Saving you a bit of time, here's most of the code, but not everything (missing the keycode init (can be found at this topic: http://www.swfkit.com/forum/index.ph...sg1602#msg1602) for SWFGen that also belongs in the Initilize script): Code:
var zGen = new ActiveXObject("SWFKit.ZGen");
if (zGen == null)
{
//SWFGen has not been registered yet, register it
//extract the dll, the variable swfgen contains the full path name of it
var swfgen = getAdditionalFile("swfgen.dll");
//copy it into the system folder
var sysfile = Shell.getSpecialFolder("system") + "\\swfgen.dll";
(new File(swfgen)).copy(sysfile);
//register it
ActiveXObject.register(sysfile);
//create the object again
var zGen = new ActiveXObject("SWFKit.ZGen");
}
//end of starting stuff, now moving into the actual work
|
|
|||
|
Thanks again.
I will certainly try this and report back how well it works. It certainly sounds the ideal solution. I think my only concern will be whether a normal user has access rights to the system folder, or indeed whether the user needs access rights to run this.
__________________
:) |
|
|||
|
Unfortunately I cannot get this to work. I've got the following code:
Code:
//Initialize
var zGen = new ActiveXObject("SWFKit.ZGen");
if (zGen == null)
{
//SWFGen has not been registered yet, register it
//extract the dll, the variable swfgen contains the full path name of it
var swfgen = getAdditionalFile("SWFGen.dll");
//copy it into the system folder
var sysfile = Shell.getSpecialFolder("system") + "\\SWFGen.dll";
(new File(swfgen)).copy(sysfile);
//register it
ActiveXObject.register(sysfile);
//create the object again
var zGen = new ActiveXObject("SWFKit.ZGen");
}
// Initialise SWFGen
swfgen.init("*** This is where my SWFGen number is ***");
Installing and SWFGen.dll via the recommended method (i.e. via when the program is first installed) works fine. Any ideas?
__________________
:) |
|
|||
|
Ok - thanks - I think I have now got this working
![]() I've also downloaded the new 2.2 update, which seems to work brilliantly. ;D One question though. Are there any disadvantages to this method of registering the SWFGen.dll? This method unpacks the .dll every time the program is run, but is there any problem doing this?
__________________
:) |
|
|||
|
Quote:
__________________
:) |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|