Posted by AGo in SWF Studio V3 on Feb 23 2008, 01:49 pm

This is more of a notice than an acutal bug report.

The only test setup I tried is as follows

-custom plugin compiled as win32 plugin with the VC05 library and header
- Flash CS3/AS3 main movie
- wrapped by SWF Studio 3.5.285, however the plugin was NOT included at buildtime

Now, if you put your custom dll (let's call it tick.dll) in startdir://
and do stuff like this

var r = ssCore.Plugin.loadFromFolder({alias:"tick" , plugin:"tick",path:"startdir://"});
   out_txt.text = "Loading Plugin,..."+(r.success? "OK" :"Error "+r.Error.description);
   var r = ssCore.tick.doSomeStuff();
out_txt.text = "doSomeStuff"+(r.success? "OK" :"Error "+r.Error.description);

it will work as expected, getting succes from both loadfromfolder and doSomeStuff

now rename your plugin dll to someothername.dll and change your code accordingly

var r = ssCore.Plugin.loadFromFolder({alias:"tick" , plugin:"someothername",path:"startdir://"});
   out_txt.text = "Loading Plugin,..."+(r.success? "OK" :"Error "+r.Error.description);
   var r = ssCore.tick.doSomeStuff();
out_txt.text = "doSomeStuff:"+(r.success? "OK" :"Error "+r.Error.description);

Now, interestingly you will get a success=true from loadFrom Folder. but then an error
doSomeStuff: Error Specified object does not exist. "ssCore.tick"

I found out that the dll must have set the pluginName property in the dll sourcecode set to the exact DLL name, or you'll get the situation descriped above.

As said no big deal, but don't you think loadFromFolder should return an error in this case?

Posted by northcode in SWF Studio V3 on Feb 23 2008, 07:25 pm

You're right, we should be returning the error as soon as we know about it. I'll see if that check can be applied in Plugin.loadFromFolder instead of being delayed until you try to call the method.