The compiler sees an object of type Interface which does not support the method you are trying to call. Either use: var tmp:ConcreteClass = new ConcreteClass(); or var tmp:Interface = new ConcreteClass(); ConcreteClass(tmp).bar();
grtz JC On 6/14/06, Mark Lapasa <[EMAIL PROTECTED]> wrote:
/////////////////////////// // Inside "Interface.as" // /////////////////////////// interface Interface { public function foo():Void; } /////////////////////////////// // Inside "ConcreteClass.as" // /////////////////////////////// import Interface; class ConcreteClass implements Interface { public function foo():Void { trace("Foo was fired");}; // As required by the interface public function bar():Void { trace("Bar was fired");}; } /////////////////////////// // Inside the "Test.FLA" // /////////////////////////// import ConcreteClass; import Interface; var tmp:Interface = new ConcreteClass(); tmp.foo(); // Works tmp.bar(); // Doesn't Work, why? I don't think all the public ConcreteClass methods have to be listed in an interface. Has anyone else come across this problem? Thx, -mL http://knowledge.lapasa.net _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com