# Need help with Movie's + Button's PLEASE!

**URL:** <https://forum.kirupa.com/t/need-help-with-movies-buttons-please/216143>\
**Category:** Uncategorized\
**Created:** [February 14, 2007, 1:54am UTC](https://forum.kirupa.com/t/need-help-with-movies-buttons-please/216143 "2007-02-14T01:54:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hermtheworm](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hermtheworm/32/1934_2.png) [@hermtheworm](https://forum.kirupa.com/u/hermtheworm)\
**Post date:** [February 14, 2007, 1:54am UTC](https://forum.kirupa.com/t/need-help-with-movies-buttons-please/216143/1 "2007-02-14T01:54:47Z")

</div>

i want it to move around randomly, (movie clip) with this code  
i also want to thank you in advance!

```
onClipEvent (load) {

//data you may want to change
width = 700;
height = 600;
speed = Math.round(Math.random()*3
                               )+1;
//initial positions
x = this._x=Math.random()*width;
y = this._y=Math.random()*height-50;
x_new = Math.random()*width;
y_new = Math.random()*height;

}
onClipEvent (enterFrame) {

//x movement
if (x_new&gt;this._x) {

sign_x = 1;
} else {
sign_x = -1;

}
dx = Math.abs(x_new-this._x);
if ((dx&gt;speed) || (dx&lt;-speed)) {

this._x += sign_x*speed;
} else {
x_new = Math.random()*width;

}
//y movement
if (y_new&gt;this._y) {

sign_y = 1;
} else {
sign_y = -1;

}
dy = Math.abs(y_new-this._y);
if ((dy&gt;speed) || (dy&lt;-speed)) {

this._y += sign_y*speed;
} else {
y_new = Math.random()*height;

}

}

```

BUT I ALSO WANT IT TO BE A BUTTON! with this code …  
i want it to open my home page.

btn\_Up.onRelease = function() {  
getURL(“javascript:launch('index.htm)”);  
}
