Put a function in your document class and check if the function is defined?
try { myDocumentClassFunction(); // must be your document class catch { // must not be your document class } On 4/20/11 7:31 PM, "Micky Hulse" <mickyhulse.li...@gmail.com> wrote: Hi, I was just curious if there is a neat way to test if a class has been attached as a document class or if it has been attached to an object (i.e. library symbol). I am trying to kick the dust my AS3 braincells here... For some reason I can't think of a good way to do this. My goal: 1. Dynamically create new movieclip and add to stage if script is the document class, and then apply click behaviors. 2. If attached to library symbol (movieclip), skip new movieclip creation and just apply click behaviors to itself. I was thinking about using typeof this.parent, but it looks like "object" is all that I can get in return. Sorry if simple one... I am sure I am overlooking a good/easy solution here. :) Cheers, Micky _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _ _ _ Erik Mattheis | Weber Shandwick P: (952) 346.6610 M: (612) 377.2272 _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders