2 Replies Latest reply on May 9, 2008 2:25 PM by w m d

    FLV Dimensions

    paulmatos Level 1
      Hi,

      I am currently building a flash player and am having it scale the video object when ever the user rescales his window. Now I have code that makes this work for a regular movieclip such as a box. But when I try and get it to work for the FLV it seems to not keep the aspect ratio. I have a feeling that this is due to the fact that the original size it is using is based on how I scale the video object prior to starting the swf.

      Now this player is intended to view flvs of different aspect ratios so this is a big issue for me. Is there any way that I can detect an flvs original height and width, and not the video objects height and width?
        • 1. Re: FLV Dimensions
          paulmatos Level 1
          im thinking this can be done with the meta data inside the flv. I have seen another flv player that displays this but am not sure how it does it, and if it can do without components and in as2.

          Anyone know the code for it
          • 2. Re: FLV Dimensions
            w m d
            This is adapted from the Help example for FLVPlayback.metadataReceived:



            /**
            Requires:
            - FLVPlayback component on the Stage with an instance name of my_FLVPlybk
            */
            import mx.video.*;
            var listenerObject:Object = new Object();
            listenerObject.metadataReceived = function(eventObject:Object):Void {
            trace("height is " + my_FLVPlybk.metadata.height);
            trace("height is " + my_FLVPlybk.metadata.width);
            };
            my_FLVPlybk.addEventListener("metadataReceived", listenerObject);
            my_FLVPlybk.contentPath = " http://www.helpexamples.com/flash/video/cuepoints.flv";