# Alignment movieclips on different resolutions

**URL:** <https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859>\
**Category:** flash\
**Created:** [May 9, 2008, 1:50pm UTC](https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859 "2008-05-09T13:50:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitchelvase](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@mitchelvase](https://forum.kirupa.com/u/mitchelvase)\
**Post date:** [May 9, 2008, 1:50pm UTC](https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859/1 "2008-05-09T13:50:46Z")

</div>

Hi i’m looking for a way to align multiple mc’s so that i can use multiple resolutions.

When the mc’s don’t fit next to each other the mc wil move to the next row.

something like:  
[http://www.flashden.net/files/29836/index.html](http://www.flashden.net/files/29836/index.html)

But then opensource 🙂

Hope someone can help.

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 9, 2008, 10:29pm UTC](https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859/2 "2008-05-09T22:29:46Z")

</div>

```auto
	public function setSize(value:Number):void {
		var newColumns:int=Math.floor((value - this.buttonContainer.x) / this.maxButtonWidth);
		if (this.columns!=newColumns) this.columns=newColumns else return;
		var point:Point=this.buttonContainer.globalToLocal(new Point(stage.stageWidth / 2,stage.stageHeight / 2))
		for (var i:int=0;i<this.buttonContainer.numChildren;i++) {
			var child:DisplayObject=this.buttonContainer.getChildAt(i);
			TweenMax.to(child,.75,{x:(i % columns) * this.maxButtonWidth + (this.maxButtonWidth - child.width) / 2,y:Math.floor(i / columns) * this.maxButtonHeight + (this.maxButtonHeight - child.height) / 2,autoAlpha:1,delay:i / 20,ease:Back.easeOut,bezier:[{x:point.x,y:point.y}]});
		}
	}

```

---

<div class="post-metadata">

**Author:** ![mitchelvase](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@mitchelvase](https://forum.kirupa.com/u/mitchelvase)\
**Post date:** [May 13, 2008, 12:56pm UTC](https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859/3 "2008-05-13T12:56:19Z")

</div>

thanks! But do you have a fla example, that makes it a lot easier.

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 13, 2008, 1:18pm UTC](https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859/4 "2008-05-13T13:18:52Z")

</div>

k

---

<div class="post-metadata">

**Author:** ![mitchelvase](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@mitchelvase](https://forum.kirupa.com/u/mitchelvase)\
**Post date:** [May 14, 2008, 9:08am UTC](https://forum.kirupa.com/t/alignment-movieclips-on-different-resolutions/259859/5 "2008-05-14T09:08:04Z")

</div>

thanks! your great!
