Hi,

interfaces are pretty simple in reality and they are everywhere.
Imagine every wall outlet looked different, and not only different, but that
in order to use them, you had to remove the outlet first, take a look at the
wiring and then bolt it back on with you finally knowing how to use it.

Would we accept that as a fact of life? No sir.
So what would we do?

We'd come up with a brilliant plan to take over the world, and it involves
agreeing on what a wall outlet looks like and what we expect it to do. So no
matter the device I want to plug in, as long as my device agrees with the
interface it has been offered, it's good to go.

Will it work without problems everywhere and always? Nah try to plug in your
dutch mp3player in the uk, no go, but within a certain context they can work
wonders.

hth :)
JC

On Tue, Aug 26, 2008 at 9:49 AM, Cor <[EMAIL PROTECTED]> wrote:

> Very good, Claus,
>
> Do you have a visual of this... LOL
>
> Regards
> Cor
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Claus Wahlers
> Sent: dinsdag 26 augustus 2008 9:42
> To: Flash Coders List
>  Subject: Re: [Flashcoders] A Question that I've been asking for years!!
>
> An example is worth a thousand words.
>
> public interface IBounce {
>    function bounce():void;
> }
>
> public class Balls implements IBounce {
>    public function bounce():void { }
> }
>
> public class Boobs implements IBounce {
>    public function bounce():void { }
> }
>
> var balls:Balls = new Balls();
> var boobs:Boobs = new Boobs();
> doSomethingWith(balls);
> doSomethingWith(boobs);
>
> function doSomethingWith(bouncyObject:IBounce):void {
>    bouncyObject.bounce();
> }
>
> Cheers,
> Claus.
>
> Omar Fouad wrote:
>
> > This could seem weird...
> > But what the hell is an interface!!!???????? I've read lots of books and
> > posts without getting the answer. I bought "Essential AS3" to read about
> > interfaces and he says that helps for multi inheritance. In other places
> I
> > read that it is a "deal" to ensure that a class has some methods and so
> on.
> > But what is the real benefit that I can come out with using
> interfaces????
> >
> > Maybe that is stupidity or I am not smart enough to get the concept but
> > believe me... its is been two years now!!
> >
> > Please Help!!!
> >
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to