9 Replies Latest reply on Nov 8, 2007 9:52 AM by Haiducii7

    How can I know, using as3, that an object is a Sprite or a MovieClip?

      Hi, I'm using a mouse event to check some UI. I was wondering if I can tell, from the "relatedObject" property of the event if the calling object is a MovieClip or a Sprite (for some functionality I want to include). The code is something like this:

      private function console_barOut(event:MouseEvent):void {

      trace (event.relatedObject.name); // returns the correct object name
      // from here I would like to check "event.relatedObject.name" and take an action if it is a Sprite and another if it is a MovieClip