Problem with loading robotleg projects into a robotlegs project

Simon Nguyen's Avatar

Simon Nguyen

19 Jul, 2011 08:03 AM

Hey Guys,

I have a project I'm working on and struggling with this show stopping problem

I have 3 games, each standalone SWF's, I'm trying to load them into my ''holder', the 3 games and the 'holder' application are all standalone Robotlegs aps,

Soon as I load any of the games into the 'holder' app i get the

ReferenceError: Error #1065: Variable HelpScreenSignal is not defined.

at flash.system::ApplicationDomain/getDefinition()
at org.swiftsuspenders.injectionpoints::PropertyInjectionPoint/initializeInjection()

Error, I've been reading for hours without much luck trying out different solutions that's worked for other people

Here's how i'm Loading my SWF's

mLoader.load(mRequest, new LoaderContext(false, new ApplicationDomain(ApplicationDomain.currentDomain)));

I'm using Signals and the latest robotlegs

Thanks guys!

  1. 1 Posted by Weyert on 19 Jul, 2011 09:03 AM

    Weyert's Avatar

    Hah, I had the same problem. I am using the following approach in combination with ModuleContext (jhooks-modular):

        public function set parentInjector(value:IInjector):void
            _injector = value;
         * @param injector
        protected function createModule(injector:  IInjector): void
        protected function createModuleContext(): void
            context = new MyModuleContext( _moduleContainer, true, _injector, this.loaderInfo.applicationDomain );

    I think the this.loaderInfo.applicationDomain part fixed it for me.

  2. 2 Posted by Simon Nguyen on 19 Jul, 2011 11:11 AM

    Simon Nguyen's Avatar

    G'day Weyert,

    Really appreciate your time

    How do you get the injector of the parent SWF to inject into the child

    Thanks again!

  3. 3 Posted by Simon Nguyen on 19 Jul, 2011 01:44 PM

    Simon Nguyen's Avatar

    G'day again,

    From my understanding your approach is when you have one main SWF file and loading in different mini Robotlegs projects into your main project through importing the Context Class and not loading in external SWF's is this correct?


    • Simon
  4. 4 Posted by visnik on 10 Aug, 2011 11:35 PM

    visnik's Avatar

    I am having the same issue when loading a sub-application built with RL into a Main Application built with RL and using Joel Hooks module utility. When I run the main applicaion I get the same 1065 error "Error #1065: Variable IntroScreenModule is not defined."

    I it only popped up after i mapped my view and mediator in the sub-apps context.

    @Weyert, I am assuming your solution worked, and I am going to try it momentarily here but I was curious, where and when is the createModule() method being called from in your solution?

  5. 5 Posted by Weyert on 11 Aug, 2011 08:40 AM

    Weyert's Avatar

    Sorry,I don't have time to look at it now. In my project something is leaking 1MB per minute. Hopefully it's not SwiftSuspenders :(

    Normally I have a start()-method which creates the module context.The method is called from the shell.

  6. 6 Posted by visnik on 12 Aug, 2011 07:07 PM

    visnik's Avatar


    I'm sorry, but I am a little confused on your response, in the code you have listed above the

    createModule(injector:  IInjector):

    method is protected, how would you call that from the shell application, also you just mentioned a start()-method, where would you put that and use it. Or is it that you would just have a

    public function  start(injector:  IInjector):void

    method in the module and just call that from the shell application.

    Sorry for my ignorance, but i am a little lost and need a little hand holding out of woods.


  7. Ondina D.F. closed this discussion on 02 Nov, 2011 06:11 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac