0 Replies Latest reply on Nov 16, 2006 3:51 PM by kgieber

    Detecting video instance type

      I'm building a component that will interact with a video player the author has placed on the stage. I have the author provide my component with the instance name to link to (via the component inspector) and I'm hoping to determine what type of video player it is (video object, Media Display component or FLVPlayback component). I tried using "instanceof" but this only works with the video object. Is "instanceof" unable to identify a class of a component?

      The code I was using to test for the instance was:

      testVO=_myVideo instanceof Video;
      trace("Is this a Video Object? "+ testVO); //does display true if it is a video object
      testMD=_myVideo instanceof MediaDisplay;
      trace("Is this a Media Display component? "+ testMD); //displays false even if it is a media display component
      testFP=_myVideo instanceof FLVPlayback;
      trace("Is this a FLVPlayback component? "+testFP); //displays false even if it is a FLVPlayback component

      Is there a better way to test for the type of video player?