A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Flv resize

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    15

    Flv resize

    Hi Everyone,

    I have used this code which resizes the background with the width of the window and it centres the background image as well,

    Code:
    	backgroundimg.scaleX=stage.stageWidth/1280;
    	backgroundimg.y=stage.stageHeight/2-backgroundimg.height/2;
    	backgroundimg.scaleY = backgroundimg.scaleX;
    I am streaming a video, and used the same code to resize the video (to scale to the width of the stage and keep it in the centre)

    Code:
     	video.scaleX=stage.stageWidth/1280;
    	video.y=stage.stageHeight/2-video.height/2;
    	video.scaleY = video.scaleX;
    However the code is not working for the video, it makes the video smaller than the stage and it is positioned to the left of the stage, but in the middle (from the top).

    The stage size is 1280 by 1024, and the video is also that size, but when the video streams, it comes up 320 by 240? not sure why this is happening.

    Any ideas why the same resize code is not working for the streaming video?


    The videos come up the correct size with this code:

    Code:
     video.width = item.width;
     video.height = item.height;
     video.x = (stage.stageWidth - video.width) / 2;
     video.y = (stage.stageHeight - video.height) / 2;
    But it doesn't resize correctly, when the stage is resized? it is not positioned to the centre of the stage.

    Hope you can help.


    Many thanks

  2. #2
    Junior Member
    Join Date
    Jul 2014
    Posts
    1

    Same issue here

    hope someone read this and ressurrect this post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center