# Menu transistions?

**URL:** <https://forum.kirupa.com/t/menu-transistions/42558>\
**Category:** Uncategorized\
**Created:** [February 10, 2004, 12:17pm UTC](https://forum.kirupa.com/t/menu-transistions/42558 "2004-02-10T12:17:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixelmisfit](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@pixelmisfit](https://forum.kirupa.com/u/pixelmisfit)\
**Post date:** [February 10, 2004, 12:17pm UTC](https://forum.kirupa.com/t/menu-transistions/42558/1 "2004-02-10T12:17:15Z")

</div>

hello kirupaforum,

I’m new to the forum!

I’ve seen the site below and I think the transistions are fantastic ![merkdesign.com](http://www.merkdesign.com/)

How has he done it so that the box expands and contracts depending on which buttons pressed…

Does anyone know how to do it or where I can find a tutorial??

pixemisfit

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 10, 2004, 2:00pm UTC](https://forum.kirupa.com/t/menu-transistions/42558/2 "2004-02-10T14:00:45Z")

</div>

Try someting with the following scrip:

Attach this code to an mc called mc\_square:

[AS]onClipEvent (load){  
speed = 4 ;  
width = 600;  
height= 400;  
xpos = 50;  
ypos = 70;  
}  
onClipEvent (enterFrame) {  
w= width - \_width;  
\_width += w/speed;  
h = height - \_height;  
\_height += h/speed  
x = xpos - \_x;  
\_x += x/speed;  
y = ypos - \_y;  
\_y += y/speed;  
}  
[/AS]

On a button you can attach:  
[AS]  
on (release) {

```
            _root.mc_square.xpos=150;
_root.mc_square.ypos=150;
_root.mc_square.height=400;
_root.mc_square.width=300;

```

}[/AS]

To make the calculations for the xpos and ypos it’s good to place the registration point of mc\_square in the left top corner.

I hope it works;)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 9:37pm UTC](https://forum.kirupa.com/t/menu-transistions/42558/3 "2004-02-11T21:37:05Z")

</div>

I think he might of used an array of sizes (dimension width and height). And told the box to reajust itself to the right dimension according to the button that was pressed.

He may of used deceleration in his transition to create the illusion of morphing.

Sorry I don’t know any tutorial.
