0 Replies Latest reply on May 31, 2011 8:14 AM by DaveBCameron

    CS5.5 FLV plays back distorted, CS4 version plays OK

    DaveBCameron Level 1

      I have a Flash application that runs videos randomly if unused for 30 secs. It fits a vertical touchscreen so it runs at 1080 wide by 1920 deep. The videos are short animations rendered from Poser as 32-bit PNGs then loaded into After Effects to add background elements, then rendered out as FLVs at the same sideways 1080P resolution.

       

      I've had to update a few of the videos, and I've also recompiled the main program in Flash 5.5. On playback, the old versions play OK, whereas the new renders play horizontally compressed, so you get a full-length video but about 20% of the correct width, with black borders. This is despite the fact that the Actionscript states the correct dimensions for playback.

       

      As far as I can tell, the render settings out of After Effects are the same as previous versions, and the videos play OK in a stand-alone player, so where's the problem?

       

      (I'd insert the loader code from the program here, but every time I try to open Flash it falls over. Yay.)

       

      var poseNo:Number = Math.round(Math.random()*(poseList.length-1));

      var randPose:String=poseList[poseNo];

      var video_vd:Video = new Video();

      video_vd.x=0;

      video_vd.y=0;

      video_vd.width=1080;

      video_vd.height=1920;

       

      var connection_nc:NetConnection = new NetConnection();

      connection_nc.connect(null);

      var stream_ns:NetStream=new NetStream(connection_nc);

      stream_ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);

      stream_ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

      video_vd.attachNetStream(stream_ns);

      addChild(video_vd);

       

      var myMovieString:String="poses/"+randPose; 

      stream_ns.play(myMovieString);

      stream_ns.pause();

      stream_ns.seek(0);

      var loaded_num:Number=setInterval(checkLoaded,500,stream_ns);

       

      function checkLoaded(my_ns:NetStream) {

      var percentLoaded:Number=Math.round(my_ns.bytesLoaded/my_ns.bytesTotal*100);     

      if (percentLoaded>=100) { 

               stream_ns.resume();

                clearInterval(loaded_num);

           }

      }

       

      function netStatusHandler(event:NetStatusEvent):void {

      if (event.info.code=="NetStream.Play.Stop") {

                closeVideo();

           }

      }

       

      function closeVideo():void { 

          stream_ns.seek(0);

           stream_ns.close(); 

          stream_ns.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);

            stream_ns.removeEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

            removeChild(video_vd);  

         video_vd=null;  

         stream_ns=null;

           connection_nc=null; 

          poseList=null;  

         gotoAndStop(1);

      }

       

      function asyncErrorHandler(event:AsyncErrorEvent):void {

      //trace(event.text);

      }

       

      Message was edited by: DaveBCameron

       

      Message was edited by: DaveBCameron