# Layout class

**URL:** https://forum.kirupa.com/t/layout-class/263401
**Category:** Uncategorized
**Created:** [June 15, 2008, 6:51pm UTC](https://forum.kirupa.com/t/layout-class/263401 "2008-06-15T18:51:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)
#### Post date: [June 15, 2008, 6:51pm UTC](https://forum.kirupa.com/t/layout-class/263401/1 "2008-06-15T18:51:32Z")

</div>

hi

i wonder if someone could get me a sunday help on this one. I’m trying to work with senocular classes, the layout one’s. I can get everything to work properly with one exception.  
When a mc is being modified by the class, let’s say it’s width, why can’t I change it’s y?

All I want to do is to have a movieclip that ajusts it’s width based on stage.stageWidth using the classes for this, but maintain it’s position along the Y free to animate.

I post the code and the fla.

👁

[AS]import com.senocular.display.\*;

stage.scaleMode = StageScaleMode.NO\_SCALE;  
stage.align = StageAlign.TOP\_LEFT;

// LAYOUT

var manager:LayoutManager = new LayoutManager();  
var master:Layout = manager.registerNewLayout(this);

master.width = stage.stageWidth;  
master.height = stage.stageHeight;

var layout:Layout;

layout = manager.registerNewLayout(this.bm, true);  
layout.percentWidth = 1;

master.draw();

// update master based on stage dimensions  
stage.addEventListener (Event.RESIZE, stageSize);

function stageSize (event:Event)  
{  
master.width = stage.stageWidth;  
master.height = stage.stageHeight;

```
master.draw();

```

}

// change prop  
this.bm.y = 500;  
master.draw();[/AS]

thanks  
am

---

<div class="post-metadata">

### Author: ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)
#### Post date: [June 25, 2008, 9:42am UTC](https://forum.kirupa.com/t/layout-class/263401/2 "2008-06-25T09:42:53Z")

</div>

anyone?

i do have this doubt since a long time, still can’t find solutions, nor other class that do the job. Maybe i’m trying something stupid, that goes against the class “function”, but really can’t figure out this one by myself.

I did this often when using some classes in AS2. Stretch or position some properties of a mc, and then animate others, although I couldn’t animate the same properties that I was passing to the “aligner” class.

:
