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?

I assume you mean the setup of my classes?
I now have a CoCMod class which is the main document class of my program: it makes an instance of CoCMain and then loads all of the plugins initialising them with the instance of CoCMain that I created:
    package me.bleachisback.cocmod {
        import flash.display.Loader;
        import flash.display.MovieClip;
        import flash.filesystem.File;
        import flash.events.Event;
        import flash.net.URLRequest;
        import flash.system.ApplicationDomain;
        import flash.system.LoaderContext;
        public class CoCMod extends MovieClip {           
            public function CoCMod() {
                loadPlugins(new CoCMain());
            private var pluginFolder:File = new File(new File("app:/plugins/").nativePath);
            private function loadPlugins(main:CoCMain):void {
                //For first run, make sure plugins folder exists
                //Then load every swf inside it
                if(!pluginFolder.exists)pluginFolder.createDirectory();
                for each(var file:File in pluginFolder.getDirectoryListing()) {
                    if(file.extension == "swf") {
                        var loader:Loader = new Loader();
                        var url:URLRequest = new URLRequest(file.nativePath);
                        loader.load(url, new LoaderContext(false, ApplicationDomain.currentDomain));
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, pluginLoadingComplete(main));
            private function pluginLoadingComplete(main:CoCMain):Function {
                return function (e:Event):void {
                    var plugin:Object = new e.target.content.mainClass();
                    var desc:XML = new XML(new e.target.content.description);
                    trace(e.target.applicationDomain == ApplicationDomain.currentDomain); //outputs false
                    plugin.initialise(main, desc.name[0], desc.description[0], desc.version[0], desc.author[0]);
                    plugin.onEnable();
                    plugin.onDisable();
The CoCMain class is relatively unchanged, except for the parts I moved over to this class.
I'm mostly confused as to why, when I specifically tell it to load into ApplicationDomain.currentDomain, the later trace outputs as false.

Similar Messages

  • HT1349 It's impossible to contact anyone from Apple helpdesk. You get sent from pillar to post only to hit a brick wall. I need some help as my Audiobooks have disappeared from my library. Been trying for 2 days to get help but can't get through to anyone

    Apple help service is crap. I've been trying to contact someone for 2 days now and can't get through to anyone. My audiobooks have disappeared from my Library - I paid a lot of money for these! None of the 'contact us' buttons get me through to anyone, you get sent electronically from pillar to post and end up hitting a brick wall.What a disgusting service - they can't even design a simple way of contacting them. I thought microsoft were bad but Apple are even worse!

    the thing is i never threw away the project plus i have a copy of it lol... it has something to do with me moving the folder im just sure of it. because when i checked the trash when i tried to delete that new folder, its there.... thats the only thing i deleted from the event library window. then the other projects that were useless that i threw away. should i restore those? i havent emptied my trash.
    also i could never find where it saves everything... so i just did a search... (im not a very techy guy) plus im unsure how to back it up... if its a feature in the program then i havent figured it out yet...
    but i think if i put the "final cut projects" folder back where i took it from it should be fine. im THINKING thats the case. the only problem is i dont know where i got it from. sounds silly i know but i found the folder from doing a search in finder.

  • HT1553 I'm trying to restore data from an external drive to the Macintosh HD that is was originally recovered from. I'm using disk utility and hit a brick wall when I click restore it asks me to scan the Macintosh HD but doesn't let me do this. what do i

    I'm trying to restore data from an external drive to the Macintosh HD from which they were originally recovered. I hit a brick wall where it says I have to scan it first and it doesnt let me.

  • Brick Wall Problem: Array of Clusters, Size of array from reference

    Good Morning Forums,
    I have hit a brick wall with my application and I am hoping somebody can help!
    I have an array of clusters of indeterminate size (the cluster is generic, data contained not relevant.).
    Inputs to the VI are: a reference to the array, and a variant containing the data.
    My problem is I need to determine the array size from these two inputs and I cannot find a way to do it!
    If the array contained a standard data type I can use the class name property to determine data type, and the size of the array returned from "select size" property to determine dimension size.  With this information i can cast the variant into the correct data type and use this to determine the size of the array.  If the data is a cluster the class name simply returns "cluster" so I cannot cast the variant and therefore am unable to determine the size.
    I am not worried about casting the data (once i determine the size this bit is no issue), I just need to determine the size (and preferably number of dimensions) of the array. Can this be done?
    Cheers for any help
    J
    John.P | Certified LabVIEW Architect | NI Alliance Member
    Solved!
    Go to Solution.

    John.P wrote:
    Good Morning Forums,
    I am not worried about casting the data (once i determine the size this bit is no issue), I just need to determine the size (and preferably number of dimensions) of the array. Can this be done?
    Cheers for any help
    J
    There seem to be a couple of potential solutions.:
    #1 if the varient is created within LabVIEW you can wite size(s) to a varient attribute.  This would be pretty straightforward and easy to implement- I imagine you would have thought of that so you may not have access to the code writing cluster to varient and it gets a bit trickier.
    #2 cast the varient to string and return string length-  this should give you a measure of total size and you would need to know the size per element of cluster (just cast one instance of cluster array to varient and then to string with size and size++) but this only returns the total size of the array since nDim arrays are actually stored sequentially. 
    Hope this helped
    Jeff

  • Banging my head against a brick wall

    Some background information: I currently have two phone lines, let’s call them line A and line B.
    At the beginning of September I decided to move by broadband to BT and signed up online for a Total Broadband package to be activated on line A (the line on which my previous broadband service was active). During the signing up process I was asked if I wished to save money and sign up to the line rental saver, which I did. I got my order confirmation by e-mail and thought all was well.
    Having ordered BT Broadband for line A,  I decided that I would cancel line B, as I had no use for it.
    Shortly after the initial order confirmation e-mail, I received a further e-mail and noticed it stated that new services were starting on both line A and line B, which confused me as I had never signed up for any changes to line B. So I called Customer Services to check out the situation and explained that I wished to cancel line B and did not understand why services relating to that line were mentioned in my e-mail. I was informed that BT was unable to do anything at the time due to there being an order on the line. However, I was told that if I called back once the broadband had been activated on line A, then everything could be sorted out.
    So, as soon as the broadband order had been completed on line A, I called back Customer Services to cancel line B. However, I was told that I had paid the line rental saver for line B and would lose that money if I cancelled the line. I checked my account online and, sure enough, BT had activated the broadband on line A but, inexplicably, had applied the line rental saver to line B.
    Immediately, I called Customer Services to sort out the problem: I wanted BT to change the line rental saver from line B to line A (as per my order) and cancel line B. However, I was told that it was not possible to change the line rental saver from one line to another. I tried to explain that the error was on the part of BT and that it was down to them to find a solution, only to be met by protestations that this was not possible. I have now spoken to customer services on three separate occasions to try and sort out the problem, without success. Twice I have requested call-backs from a manager and heard nothing either time.
    I have now reached the end of my tether as I do not understand why BT is claiming that they are unable to correct their own error. As a result of the situation, I am currently paying for a line I no longer want and am unable to cancel the line without losing a fair amount of money.
    Where did it all go wrong with BT customer service? I am sick of speaking to people who struggle to grasp the nature of issues and appear powerless to address any problems unless they are on their crib sheets. It is very frustrating that BT makes it impossible to escalate problems to managers when needed and I am incredulous that the Company is trying to claim that it is unable to sort out a billing error of its own making (particularly as I would imagine that the change of line rental saver from one line to another is simply a matter of changing some details on a computer system).
    I hope that someone here can offer some help or point me in the right direction, as I currently feel like I am banging my head against a brick wall and am very disappointed with BT’s response so far.
    Many thanks
    DJW

    Hi David, sorry to hear about your problems. If you click the link in my signiture below my posts the forum mods will be happy to look into this for you
    Contact The Mods
    Use Live Chat to speak to an advisor
    Charges for cancelling your contract early

  • BRICK WALL

    Hello and thanks to anyone who posts in this thread.
    I just finished editing all my wedding ceremony, reception, and honeymoon footage, barely fits on one DL DVD. I I authored the DVD in iDVD. Because of all the submenus and slideshows...my father-in-law says it's a pain to grab the remote to go to the next video...there should be a play all button. Now, I have my own thoughts and opinions on the remote issue...lets not get in to that...i just want to make him happy...lol.
    This is my brick wall...
    I have DVD Studio Pro 4...it's not that complicated of a DVD to use it. Can I take what I've done in iDVD, and add that one button in DVDSP4?
    I have Toast - Can I do it in Toast?
    Please help me climb the wall. Thank you.

    Hello,
    DVDSP can do this. I don't know the exact steps off the top of my head. However, DVDSP will not use any iDVD assets. Your sequence will need re-compressed via Compressor. Or, for such a long sequence(s), I might suggest picking up LaCie's FastCoder (http://www.lacie.com/products/product.htm?pid=10498). I am just trying it out as I type this but so far so good! Near real-time encoding of sequences in an elementary stream (what DVDSP needs). Compare that to at least 1.5x encoding on super fast systems. Well worth the $50. Another reason to use DVDSP with such long content is that DVDSP will use compressed audio, iDVD uses full quality PCM (uncompressed) audio. This will chew up a chunk of disk real-estate.
    Don't know about Toast, other than your project would still need to be re-compressed.
    Finally, any type of media, discs, hard drives, compact flash, etc... always has less useable space than "advertised" due to how the bytes are calculated:
    http://www.digitalfaq.com/media/dvdformats.htm
    Mike

  • I can't get a signal through whole house because of a brick wall   What range extender do you recommend to be used with my wireless router ( apple brand)

    I can't get a signal through whole house because of a brick wall   What range extender do you recommend to be used with my wireless router ( apple brand)

    Very few 3rd party wireless extenders will work with an Apple router, so your best bet is always to use an extender that is the same brand as the main router. An AirPort Express is a popular choice for this type of application with another Apple router.
    If you had a Cisco router, then a Cisco extender would be your best bet.  Same for Netgear, etc.
    But......a wireless extender can only "extend" the quality of wireless signal that it receives, and not much of a wireless signal is going to make it through a brick wall, so whether any extender might do what you want is open to question.
    You won't know whether an extender using wireless to connect will work to your satisfaction in your home until you actually try it out in your home.
    The performance will always be much better if you can connect the extending device back to the main router using a wired Ethernet cable connection.
    If it is not possible to run the Ethernet cable, a pair of Ethernet power line adapters might be able to send the signal over the existing AC power lines in your home. The theory with these devices is that you already have the wiring in place, you just need the adapters.
    In practice though, things do not always work as well as the theory might suggest, so if you decide to try a pair of adapters, it might be a good idea to understand the store's return policies before you buy.

  • Trying to scan photos from my photo album to a folder on my desktop.  Have been trying to figure out for over an hour.  Seems very complicated and cumbersome,  Can you help?

    Trying to scan photos from my photo album to a folder on my desktop.  Have been trying to figure out for hours.  Seems very complicated and cumbersome.  Can anyone help?  It's got to be much quicker (fewer key strokes) and simpler than what I've been able to discover.

    Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
    http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
    If this post answered your question or helped, please mark it as such.

  • I want to move a selection (a person) into an image of a brick wall and have it look like the person was painted on the wall. Can it be done? Using CC on iMac. Thanks

    I want to move a selection (a person) into an image of a brick wall and have it look like the person was painted on the wall. Can it be done? Using CC on iMac. Thanks

    Yes of course its Photoshop. Cut the person out copy to clipboard paste onto toe brick wall document  and texture the layer using a displacement map for the brick wall. Look for Photoshop tutorials on using a displacement map.

  • Using a Brick Wall .jpg as a Texture - in PSE and AI?

    Hello Photoshop Elements users and experts: thanks in advance for reading this post and for your generous help. 
    I would like to use the brick wall in the following image:
    To be applied to the surrounding edge of an illustration in Adobe Illustrator so that the billboard blends into the bricked wall which it is in front of
    How can I accomplish this?  Thanks for your help!

    What do you mean by "blends" ? Do you simply want to superimpose the billboard over the brick wall or something more elaborate?

  • Brick walls in dvd player 4.6.1

    Hi all,
    I upgraded to 10.4.3 from 10.3 a week ago. I'm using dvd player 4.6.1 as well.
    Now when I play regular (not burned) dvd's, you know, the kind one buys in a store, I get a lot of visible (digital ?) distortion.
    It's like the pictures have no smoothing anymore. Horizontal lines will flip in slow camera sweeps. Shoulders will have " brick-wall " shapes. As will other horizontal parts like lips, eyes, eyebrows, highways, etc. When I boot up in 9.2.2 and watch the same dvd's, I don't have any problems of this kind !!!!
    Is there anyone out there experiencing the same problems ?

    Hi,
    It took me some time, but I did not like the idea of removing and modifying me otherwise good working 10.4.3 system. So the last week of december I bought an extra hard disk and started upgrading my G4. It now has the original 20 G HD, an 80 G and a 250 G HD installed.
    I now have two partitions on the 80 G disk : 9.2.2 and 10.4.4
    On the 20 G disk is my original 9.2.2 and a 10.2.8 .
    I was able to copy the 3.2 DVD program from the 10.2.8 system onto my 10.4.4 partition and it works fine there !
    I now can compare the 3.2 DVD player and the 4.6.5 DVD player directly. It turns out the 3.2 version has nearly perfect image quality (no distortion) and the 4.6.5 has the same problem as the 4.6.1 version : distortion like the steps of a staircase. So Apple did not resolve the problem with the upgrade, or my setup is not supported any more; but I don't believe that.
    (my G4 hardware : G4 400, 2G Ram, 23" HD Cinema display, 19" 109S philips crt, ATI Radeon 9000 Pro 128 MB, OS 10.4.4)
    If needed I can build a second 10.4.4 system and I probably will, to be absolutely sure.
    Greetings,
    Tubamaniak

  • When i type my email, the text would go on and on and overflows. I mean to say it doesn't autmatically hit the right hand side wall and change to next line! I have to manually press enter and then next line starts. Started happening suddenly.pls help.

    When i type my email, the text would go on and on and overflows. I mean to say it doesn't autmatically hit the right hand side wall and change to next line! I have to manually press enter and then next line starts. Started happening suddenly.pls help.

    Does it happen when you reply to an email? If so, it might be that there's content in the original email (like an image or something similar) that overflows the window content, therefore the Mail app, when you hit the border, follows the content below instead of going on a new line. You might wanna try that.
    Also: Please do not post the whole question in the question title.

  • Make writing appear as though hugging a textured background such as a brick wall - how do I do that?

    make writing appear as though hugging a textured background such as a brick wall - how do I do that?

    I'm not sure I understand what you mean by "hugging"?  Do you want the text to contain a pattern overlay or just the layer beneath it?  Or perhaps you want a pattern overlay on both layers?  Click on screenshot.
    Nancy O.

  • I am sorry, this is like talking to a brick wall. I have a few issues and just not one restricted to

    This is like talking to a brick wall. I have a few issues not just one or two. I need to talk and explain these on a one to one basis and not expose and sprawl all over!

    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

  • I have Airport Extreme as the base unit and an Express unit in a room separated by a brick wall to improve signal. Express shows a green light indicating signal but my iPad does not perform well. How can I improve other than hardwire ethernet connection?

    I have Airport Extreme as the base unit and an Express unit in a room separated by a brick wall to improve signal. Express shows a green light indicating signal but my iPad does not perform well. How can I improve other than hardwire ethernet connection?

    Other suggestions, and more info about the nature of the problem, may be in this Apple tech note.
    http://support.apple.com/kb/HT1365
    For example, you might find that the brick wall is not the only problem. There may be other devices pumping out enough wireless interference to be making things even worse.
    I agree with Bob Timmons that Ethernet is best and most reliable. And that powerline (which I use) is easier and potentially faster than wireless...but only if your power lines do not have electrical devices plugged in which produce electrical noise on the line. Powerline will be slower than Gigabit Ethernet.
    Ethernet cable is the only way to ensure that the signal goes directly there in a shielded way for a clear fast signal. Wireless and powerline are much slower because of all the other things the signal has to fight past to get to the other device.

Maybe you are looking for

  • RICEF Security - best practice to develop security specs

    Good Morning All, We have new ECC implementation kicked off, my question is how RICEF security is controlled? What are the standard guidelines practised in industry? We are encouraging process teams to start use authorizations checks in custom transa

  • Report ORA-12514 once restart Oracle 10.2 database

    OS: Windows2003 Standard Edition SP1 Oralce 10.2.0.1.0 for Micorsoft Windows(32bit) I install Oracle 10.2 on Windows 2003, during installation, reports a waring at Product-Specific Prerequisite Checks: Checking Network Configuration requirements ...C

  • Change u201CDefault for baseline dateu201D programming. Have you ever do it?

    Hello colleagues, I want to pay to my vendors with the u201CBase line dateu201D equal to the entry date of the treated document. For this reason I set several payment-terms with u201CDefault for baseline dateu201D = u201CEntry dateu201D. This ran per

  • Update trigger error

    Hello, I have this issue where I'm getting the following error when executing an update in a view. Insert command appears to be OK. Any idea on what am I missing? ORA-01084: invalid argument in OCI call ORA-06512: at "APPS.XXRVM_TEMP_B_UPD_TR", line

  • CD label stuck

    heres the story: i had to preview a cd and because it is yet to be released it had a crappy paper sticker with the name of the band/album. my imac started making weird noises so i tried to eject the CD, to no avail. Had to unplug and then restart hol