Posted By

hejaaa on 03/26/11


Tagged

resize


Versions (?)

resize center proportional movieclip


 / Published in: ActionScript 3
 

  1. // resize
  2. bcgMC.width = stage.stageWidth;
  3. bcgMC.height = stage.stageHeight;
  4. bcgMC.scaleX > bcgMC.scaleY ? bcgMC.scaleY = bcgMC.scaleX : bcgMC.scaleX = bcgMC.scaleY;
  5.  
  6. // center
  7. bcgMC.x = stage.stageWidth / 2 - bcgMC.width / 2;
  8. bcgMC.y = stage.stageHeight / 2 - bcgMC.height / 2;

Report this snippet  

You need to login to post a comment.