Re: [Flashcoders] Interface for displayObjects

2009-08-09 Thread Juan Pablo Califano
) to vote for it. > > - Original Message - From: "Juan Pablo Califano" < > califa010.flashcod...@gmail.com> > To: "Flash Coders List" > Sent: Saturday, August 08, 2009 8:35 PM > Subject: Re: [Flashcoders] Interface for displayObjects >

Re: [Flashcoders] Interface for displayObjects

2009-08-08 Thread Muzak
What makes things move forward is voting. Ask people (like on this list or FlexCoders) to vote for it. - Original Message - From: "Juan Pablo Califano" To: "Flash Coders List" Sent: Saturday, August 08, 2009 8:35 PM Subject: Re: [Flashcoders] Interface for displa

Re: [Flashcoders] Interface for displayObjects

2009-08-08 Thread Juan Pablo Califano
no" < > califa010.flashcod...@gmail.com> > To: "Flash Coders List" > Sent: Saturday, August 08, 2009 7:39 PM > Subject: Re: [Flashcoders] Interface for displayObjects > > > Hi, >> >> I've had the same problem and couldn't find a real solution

Re: [Flashcoders] Interface for displayObjects

2009-08-08 Thread Muzak
Message - From: "Juan Pablo Califano" To: "Flash Coders List" Sent: Saturday, August 08, 2009 7:39 PM Subject: Re: [Flashcoders] Interface for displayObjects Hi, I've had the same problem and couldn't find a real solution. The simplest thing to do, for me, was ju

Re: [Flashcoders] Interface for displayObjects

2009-08-08 Thread Juan Pablo Califano
Hi, I've had the same problem and couldn't find a real solution. The simplest thing to do, for me, was just using the as operator: var obj:ISomeInterface = new ConcreteObject(); container.addChild(obj as DisplayObject); I like that it doesn't require an extra variable and it doesn't clutter yo

Re: [Flashcoders] Interface for displayObjects

2009-08-07 Thread Hans Wichman
Hi, when you declare them like this: var myObj1:MyInterface addChild (myObj1) wont work if you do var myObj1:Sprite = ... addChild (myObj1) it probably will. The thing is that you essentially provide two different interfaces for your object. By extending Sprite you satisfy the DisplayObject req

[Flashcoders] Interface for displayObjects

2009-08-07 Thread Tom Huynen
Hi! I have a tiny little problem with the following: I have two classes that should have the same dataType in order to use them in a third class. So I created an Interface that both of them implement. The two classes extend Sprite because they have a visual representation. However, when I try to