# AS3 button firing off multiple times on quick press only

**URL:** <https://forum.kirupa.com/t/as3-button-firing-off-multiple-times-on-quick-press-only/324838>\
**Category:** flash\
**Created:** [September 11, 2011, 10:10pm UTC](https://forum.kirupa.com/t/as3-button-firing-off-multiple-times-on-quick-press-only/324838 "2011-09-11T22:10:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![somdow](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@somdow](https://forum.kirupa.com/u/somdow)\
**Post date:** [September 11, 2011, 10:10pm UTC](https://forum.kirupa.com/t/as3-button-firing-off-multiple-times-on-quick-press-only/324838/1 "2011-09-11T22:10:34Z")

</div>

ok so, i wrote this code:

```auto
function btn4Loaded(e:Event):void { //-- START btn4Loaded
        if (e.target == load1 || e.target == load2) {
            myLoadedSwf.gotoAndPlay("outro");

            removeChild(myLoadedSwf);

            urlRequest = new URLRequest(e.target.name+".swf");
            loader.load(urlRequest);
            addChild(myLoadedSwf);
        }

} // end btn4Loaded.

```

and it works, once clicked, it does what it has to do. Ofcourse, me trying to break it, i found that if i click the buttons fast, it will re-import the external swfs causing me to have multiple instances of the external swf.

so in short, if i click like normal(slow ) ie like a person that clicked to view a section etc, then its fine, if i click fast or repeated clicking ie like a person that double clicks etc, then the problem occurs.

any ideas how to fix this?

thanks in advance.

edit\*\*\* heres a link to test file to show what i mean [http://www.somdowprod.net/4testing/flash/tst](http://www.somdowprod.net/4testing/flash/tst)
