A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Stage Resize Question

  1. #1
    Join Date
    Jun 2008

    Stage Resize Question

    New to AS3 so forgive my ignorance but I have a movieclip that I am trying to center on the stage. I use the following code:
    backGround_mc.x = (stage.stageWidth/2)-(backGround_mc.width/2);
    	backGround_mc.y = (stage.stageHeight/2)-(backGround_mc.height/2);
    It works perfect when I preview the SWF but when I publish it in different browsers the movieclip is never in the center. So what am I doing wrong? Thanks.

  2. #2
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Is your published .swf embedded as 100% width and 100% height ( full browser ) ? Because if it's not then that's the problem.

    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |

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