|
|||
|
Hey, this is what SWFGen Support sent me, so I though I would share it with anybody wondering: (might be of some use to others)
--------------- Before you can use the methods and properties of an activex object, you must register it. You can register the SwfGen object in your setup program, that is to say, you can let your setup program to copy the swfgen.dll to your user' computers and register it. In your own computer, you can type "regsvr32 swfgen.dll" in the command prompt to register it. If you don't want to use any of the above methods to register the swfgen object, you can do like the demo we've sent to you: FFish script includes a method "ActiveXObject.register" to register an ActiveX object. The method takes one parameter, the full path name of the dll. In the demo, we add the swfgen.dll as an additional file, and in the FFish script, we register it by the using following statement: ActiveXObject.register(getAdditionalFile("swfgen.d ll")); And when the main window is about to close, we unregister it by using the "ActiceXObject.unregister" method. Of course you can copy the swfgen.dll into the system folder, and register it for only once, and don't need to unregister it. Just like this: 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"); } |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|