I've hit a very complicated brick wall
I'm sorry that I can't be more descriptive in my title, but I think I stuck my neck too deep and now I can't tell what is not working. I'm going to atempt to be as clear and concise as possible in my explanation, but sorry if I do something completely wrong or don't understand it fully.
Basically, what I am trying to do is load a bunch of .swf files that each extend the class "Plugin" from a folder called "plugins", and then execute specific code from them at specific times.To do this properly, I'm making a test plugin that is using a .swc library from the main program to extend "Plugin". Whenever I want to instantiate something that extends "Plugin", I have to give it a reference to my main program. However, here is where the problem occurs: when I try to load and then instantiate the plugin, I get an error saying that my main class is not my main class:
TypeError: Error #1034: Type Coercion failed: cannot convert me.bleachisback.cocmod::CoCMain@51b31f1 to me.bleachisback.cocmod.CoCMain.
I've been trying to fix this problem for the past week, and I just can't figure it out. I have a feeling it might have something to do with how I use the .swc file, but I can't tell if that is true/how to fix it because there is barely any documentation out there on it, especially in normal Flash and not Flash Builder.
Below is my source and how I attempted to get it to work:
https://mega.co.nz/#!Pdtn2SiB!ISszSDdGkaZyw6HB1ntRaVD2kckmnAxDeGsMTqS9SVw (A rar file containing my source)
There are 10 main files in the rar:
System/CoCMod.fla - The fla file for the main program
System/CoCMod.swc - The swc file for the main programe, and the library my plugin is using
System/CoCMod.swf - The swf for the main program
System/me/bleachisback/cocmod/CoCMain.as - The main class for the main program
System/me/bleachisback/cocmod/Plugin.as - The "abstract" class that every plugin should extend
System/plugins/TestMod.swf - The swf for the plugin, same as below. Does not do anything unless loaded by the main program.
Test Mod/TestMod.fla - The fla file for the plugin. Has actionscript on frame 1.
Test Mod/TestMod.swf - The swf for the plugin, same as above.
Test Mod/main.xml - Embedded into TestMod.swf, contains information about the mod.
Test Mod/plugin/bleachisback/testPlugin/TestMain - The main class for the plugin - extends Plugin.
This is how I export the .swc file (in CoCMod.fla):

And this is how I reference it in TestMod.fla:

What should happen is just a simple "blah" appears in the console, but for as few lines of code as I have, it doesn't want to work. Can someone tell me what I'm doing wrong?
