Hello :)

you must use "Transtype" if you use a method defined in your class but not
in the interface :)


[code]
import ConcreteClass;
import Interface;
var tmp:Interface = new ConcreteClass();

tmp.foo();  // Works

ConcreteClass(tmp).bar();  // Works with methods not implemented in
interface.
[/code]

EKA+ :)

2006/6/14, Mark Lapasa <[EMAIL PROTECTED]>:

///////////////////////////
// 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

Reply via email to