# Flash and php

**URL:** <https://forum.kirupa.com/t/flash-and-php/282031>\
**Category:** Uncategorized\
**Created:** [February 16, 2009, 11:55pm UTC](https://forum.kirupa.com/t/flash-and-php/282031 "2009-02-16T23:55:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Woodbury](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Dan\_Woodbury](https://forum.kirupa.com/u/Dan_Woodbury)\
**Post date:** [February 16, 2009, 11:55pm UTC](https://forum.kirupa.com/t/flash-and-php/282031/1 "2009-02-16T23:55:17Z")

</div>

i have created a menu for a site i am making for a friend, [http://www.ontherocks.me.uk/index2.php](http://www.ontherocks.me.uk/index2.php)

this is the actionscript for the menu:

```auto

speed = 5;
target = button1._x;

button1.onRelease = function() {
    target = button1._x;
    getURL("http://www.ontherocks.me.uk/index2.php?go=home","_self");
}
button2.onRelease = function() {
    target = button2._x;
    getURL("http://www.ontherocks.me.uk/index2.php?go=bio","_self");
}
button3.onRelease = function() {
    target = button3._x;
    getURL("http://www.ontherocks.me.uk/index2.php?go=gear","_self");
}
button4.onRelease = function() {
    target = button4._x;
    getURL("http://www.ontherocks.me.uk/index2.php?go=gigs","_self");
}
button5.onRelease = function() {
    target = button5._x;
    getURL("http://www.ontherocks.me.uk/index2.php?go=media","_self");
}
button6.onRelease = function() {
    target = button6._x;
    getURL("http://www.ontherocks.me.uk/index2.php?go=contact","_self");
}

this.onEnterFrame = function() {
    current._x += (target-current._x)/speed;
};

```

when you click a link on the menu, the bar slides to the new location which is what i want but once the page has loaded it goes back to its original position on home. is there a way i can stop it doing this? so that when i click on ‘gigs’ the white block stays over gigs etc

thanks alot
