# Actionscript 3 code explanation to understand the logic?

**URL:** <https://forum.kirupa.com/t/actionscript-3-code-explanation-to-understand-the-logic/323770>\
**Category:** flash\
**Created:** [July 17, 2011, 6:08am UTC](https://forum.kirupa.com/t/actionscript-3-code-explanation-to-understand-the-logic/323770 "2011-07-17T06:08:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [July 17, 2011, 6:08am UTC](https://forum.kirupa.com/t/actionscript-3-code-explanation-to-understand-the-logic/323770/1 "2011-07-17T06:08:13Z")

</div>

Hi,

Please help me to understand the following code (the logic in using it) line by line:

```auto
 
navContainer.y=stage.stageHeight-60;
navContainer.scaleX=stage.stageWidth/980;

header.scaleX=stage.stageWidth/980;
 
mainContainer.x=stage.stageWidth/2-mainContainer.width/2;
mainContainer.y=stage.stageHeight/2-mainContainer.height/2;
 
mainContainer.welcome_image.x = stage.stageWidth - (stage.stageWidth/980)*540;
mainContainer.welcome_content.scaleX=stage.stageWidth/1020;

```

Thanks.
