# Maybe Easy for U, Hell for me!

**URL:** <https://forum.kirupa.com/t/maybe-easy-for-u-hell-for-me/305700>\
**Category:** flash\
**Created:** [March 2, 2010, 6:46am UTC](https://forum.kirupa.com/t/maybe-easy-for-u-hell-for-me/305700 "2010-03-02T06:46:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aliennoise](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@aliennoise](https://forum.kirupa.com/u/aliennoise)\
**Post date:** [March 2, 2010, 6:46am UTC](https://forum.kirupa.com/t/maybe-easy-for-u-hell-for-me/305700/1 "2010-03-02T06:46:21Z")

</div>

In short. Im trying to position everything dead center on resize esxept the bluebarBack MC, she needs to go y+50 to align properly, every time i execute something i get weird positioning and snapping of bluebarBack MC  
Thanks – any help is appreciated… long live :mr\_t:KIRUPA:mr\_t: happy birthday

:insomniac::insomniac:

```auto
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

function resizeHandler(e:Event):void
{
  centerRectangle.x = (centerRectangle.stage.stageWidth / 2) - (centerRectangle.width / 2);
  centerRectangle.y = (centerRectangle.stage.stageHeight / 2) - (centerRectangle.height / 2);
  
  bluebarBack.x = (bluebarBack.stage.stageWidth / 2) - (bluebarBack.width / 2);
  bluebarBack.y = (bluebarBack.stage.stageHeight / 2) - (bluebarBack.height / 2);
  
  gradientBack.x = (gradientBack.stage.stageWidth / 2) - (gradientBack.width / 2);
  gradientBack.y = (gradientBack.stage.stageHeight / 2) - (gradientBack.height / 2);
  
}

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandler);

stage.dispatchEvent(new Event(Event.RESIZE));

```

:insomniac::insomniac:
