# Preloader Help with an enter button

**URL:** <https://forum.kirupa.com/t/preloader-help-with-an-enter-button/306589>\
**Category:** flash\
**Created:** [March 18, 2010, 12:54am UTC](https://forum.kirupa.com/t/preloader-help-with-an-enter-button/306589 "2010-03-18T00:54:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazereth](https://avatars.discourse-cdn.com/v4/letter/l/9de053/32.png) [@lazereth](https://forum.kirupa.com/u/lazereth)\
**Post date:** [March 18, 2010, 12:54am UTC](https://forum.kirupa.com/t/preloader-help-with-an-enter-button/306589/1 "2010-03-18T00:54:35Z")

</div>

Hey I love how clients make you change things left and right but ohhh well.

I was wondering if any of you can help me out a little.

I have a preloader that loads a external SWF in a movie clip on the main timeline. right now it automaticly starts the external SWF. My client wants me to make a button that will start the preloaded swf instead of it automaticly starting.

the code that I have at the moment:

```auto
siteLoader.loadMovie("http://www.quroscuro.com/bd/index2.swf");
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function() {
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
if (percentage == 99) {
this._parent.frameBar._alpha = false;
this._alpha = 0;
delete this.onEnterFrame;
}
}

```

I will make a button that is enter\_btn and tagged that way for usage.

so I am guessing some where in the actionscript I will have to put something like.

```auto
enter_btn.onPress = function () {start(index2.swf);}

```

but I am sure I am quite wrong with this. But I need to know what to change to the first code and how to call the action to start the clip for the onPress = function.

I still need the progress bar to show till it is fully loaded and the switch to say frame 2 of the movie where the enter button is and it doesn’t show the progress bar anymore. and then when you click the enter button it starts the preloaded external swf.

I appreciate any help that anyone can give me on this. I am still learning actionscript and still getting the basic understanding of how it works.

Thanks again.
