Is there any way to have a property of the same type as the class itself?:
package { public class TestClass { private var myClass:TestClass = new TestClass(); ....
Flash compiler rejects this. But I know that in C++ you can have a property of the same type as your class if it's a pointer. Is there anyways to do this in Flash?
It's possible but you might have declare it as static for it to work fully. The most often this is used is in a Singleton design pattern. Here is a link that might help explain this a little better, Singleton.
I'm kind of confused as to the reason for having a reference within a reference of the same type is, but in any case I'm curious why this would be needed? You probably know this, but the "this" property gives you access to the instance of the class within itself. Just a note. Hope this helps.
if you got rid of the = new TestClass(); it would be fine. Then in the constructor you could put that in an if statement such that it would not constantly be creating more instances of it. Are you trying to make a linked list or something? I blieve there's a built-in class for that that you'd be better off using