Sorry to keep bothering everyone. I'm getting close....I can just feel it.
So I added the com.example as an .as file, added the implements part to the module and strongly typed the call. I also did an import com.example.IBuildingModule; But i am still getting some errors at this line: var mod:IBuildingModule = modBuilding_In.child as IBuildingModule; 1046: Type was not found or was not a compile-time constant: IBuildingModule And 1120: Access of undefined property IBuildingModule Thanks Justin --- In [email protected], "diehlryan" <[EMAIL PROTECTED]> wrote: > > One nice way to do this is to define an interface, IBuildingModule or > something like that, and make the module implement it. > > package com.example > { > public interface IBuildingModule > { > function loadBuildingRecord():void; > } > } > > // make the module implement it > <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" > implements="com.example.IBuildingModule" ...> > > public function loadBuildingRecord():void > { > // load the record > } > > </mx:Module> > > > Now, after loading the module, you can strongly-type it to the > interface, which means you get nice things like code completion and > compile-time checking. It's also more apparent to someone else what > you're trying to do with the code. So to call the method from the > application, you would do: > > private function ShowInput():void > { > if(gTableName == "Building"){ > var mod:IBuildingModule = modBuilding_In.child as IBuildingModule; > mod.loadBuildingRecord(); > currentState = "Building In"; > } > } >

