# Any way to shorten this?

**URL:** <https://forum.kirupa.com/t/any-way-to-shorten-this/249995>\
**Category:** Uncategorized\
**Created:** [January 24, 2008, 11:15am UTC](https://forum.kirupa.com/t/any-way-to-shorten-this/249995 "2008-01-24T11:15:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![youwh](https://avatars.discourse-cdn.com/v4/letter/y/82dd89/32.png) [@youwh](https://forum.kirupa.com/u/youwh)\
**Post date:** [January 24, 2008, 11:15am UTC](https://forum.kirupa.com/t/any-way-to-shorten-this/249995/1 "2008-01-24T11:15:02Z")

</div>

I have a lot of buttons which uses the code “getURL” how can i shorten it?  
i know the best way might be using xml so that later on i could change it more easily, but that would affected other part of my structures for now.

so any1 know how?

```auto
_root.themenu.sandwiches.b01.onPress = function() {
    getURL("services.html", "goiframe");
};
_root.themenu.sandwiches.b02.onPress = function() {
    getURL("services.html", "goiframe");
};
_root.themenu.sandwiches.b03.onPress = function() {
    getURL("services.html", "goiframe");
};
_root.themenu.sandwiches.b04.onPress = function() {
    getURL("services.html", "goiframe");
};
_root.themenu.sandwiches.b05.onPress = function() {
    getURL("services.html", "goiframe");
};

```
