Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:27:13+00:00 2026-05-25T18:27:13+00:00

I am using interfaces for module communication like in adobe flex documentation . When

  • 0

I am using interfaces for module communication like in adobe flex documentation. When I have a ModuleLoader in mxml, everything works great.

<mx:TabNavigator id="testNav"
                height="100%"
                width="100%">
        <s:ModuleLoader id="firstTab" 
                        label="ONE" 
                        width="100%"
                        url="path/to/module/Mod1.swf"/>

        <s:ModuleLoader id="secondTab"
                        label="TWO" 
                        width="100%"
                        url="path/to/module/Mod2.swf"/>


</mx:TabNavigator>

and i have this code

var someChild:* = firstTab.child as ISomeModule;

ISomeModule is the interface.
But when I have a ModuleLoader in actionscript in another file, when I do the same thing, someChild becomes null when cast to ISomeModule

var myLoader:ModuleLoader=new ModuleLoader();
myLoader.percentHeight=50;
myLoader.percentWidth=50;
myLoader.loadModule(moduleURL + "?attr=value&attr2=" + parentDocument.attr2);

and in another function, I have

var childMod:* = myLoader.child as ISomeModule;

myLoader.child is not null but when cast to ISomeModule, it becomes null.
Does anyone have an idea about how to solve this?
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:27:14+00:00Added an answer on May 25, 2026 at 6:27 pm

    2 things:

    • You need the same ApplicationDomain for cross-module class sharing (you should also enable optimizing in your Module compilation): <s:ModuleLoader url="someURL" applicationDomain="{ApplicationDomain.currentDomain}" />
    • If I remember correctly, it should be firstChild.content and not firstChild.child for the actual module itself.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're using interfaces to represent entity classes in our domain model. We have concrete
I am trying to implement my persitent classes using interfaces. I have created the
Using online interfaces to a version control system is a nice way to have
I have previously written user interfaces using .NET and Windows Forms. I'm about to
I have seen arguments for using explicit interfaces as a method of locking a
Using interfaces is a very easy way to remove dependencies, but what happens when
Is there a runtime performance penalty when using interfaces (abstract base classes) in C++?
Is okay to break all dependencies using interfaces just to make a class testable?
What is the difference between using the Runnable and Callable interfaces when designing a
We have a concrete singleton service which implements Ninject.IInitializable and 2 interfaces. Problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.