I'm sorry I'm not understanding you but if I install a module in the
root application like this:
<mx:Canvas id="canvasBuilding_In">
<mx:ModuleLoader url="Building_In.swf" id="modBuilding_In" />
</mx:Canvas>
How would I call the public function in that module. I don't really
understand what you mean about casting the child to a class and so forth.
Thanks
Justin
--- In [email protected], "Bjorn Schultheiss"
<[EMAIL PROTECTED]> wrote:
>
> Sorry about that.
> child is obviously typed to DisplayObject.
> basically there is no method on DisplayObject called loadBuildingRecord.
>
> Either you cast child to a class or interface that more appropriate
> within the Module's inheritance chain, or untype it.
>
> var untypedChild:* = modBuilding_In.child;
> untypedChild.loadBuildingRecord()
>
>
>
> --- In [email protected], "jwilliquor" <jwill@> wrote:
> >
> > When I add the child property the compiler displays the following
error:
> >
> >
> > 1061: Call to a possibly undefined method loadBuildingRecord through a
> > reference with static type flash.display:DisplayObject.
> >
> > Am I missing something?
> >
> > Thanks
> > Justin
> >
> >
> >
> > --- In [email protected], "Bjorn Schultheiss"
> > <bjorn.mailinglists@> wrote:
> > >
> > > your loaded module can be accessed via the child property of
> > ModuleLoader.
> > >
> > > modBuilding_In.child.loadBuildingRecord();
> > >
> > > --- In [email protected], "jwilliquor" <jwill@> wrote:
> > > >
> > > > Ok So I have read a number of posts and it's not sinking into my
> thick
> > > > noob skull.
> > > >
> > > >
> > > >
> > > > I am trying to call the following function from my parent app.
> > > >
> > > > public function loadBuildingRecord():void{
> > > > httpLoad.send();
> > > > }
> > > >
> > > >
> > > >
> > > > I have my module loading in the parent app like this.
> > > >
> > > > <mx:Canvas id="canvasBuilding_In">
> > > > <mx:ModuleLoader url="Building_In.swf" id="modBuilding_In" />
> > > > </mx:Canvas>
> > > >
> > > >
> > > >
> > > >
> > > > I'm trying to call the function like this from a function in the
> > > main App.
> > > >
> > > > private function ShowInput():void{
> > > > if(gTableName == "Building"){
> > > > modBuilding_In.loadBuildingRecord();
> > > > currentState = "Building In";
> > > > }
> > > > ]
> > > >
> > > >
> > > > Any help would be greatly appreciated.
> > > >
> > > > Thanks
> > > > Justin
> > > >
> > >
> >
>