# Play button for preloader

**URL:** <https://forum.kirupa.com/t/play-button-for-preloader/197886>\
**Category:** flash\
**Created:** [August 20, 2006, 11:29am UTC](https://forum.kirupa.com/t/play-button-for-preloader/197886 "2006-08-20T11:29:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wes\_Ide](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wes_ide/32/1119_2.png) [@Wes\_Ide](https://forum.kirupa.com/u/Wes_Ide)\
**Post date:** [August 20, 2006, 11:29am UTC](https://forum.kirupa.com/t/play-button-for-preloader/197886/1 "2006-08-20T11:29:09Z")

</div>

Hello everyone.

I followed the tutorial found [here](http://www.kirupa.com/developer/mx/percentagepreloader.htm)to create a percentage bar preloader.

That said, I have the following on frame 1

```auto
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
    this.gotoAndPlay(3);
}

```

and the following on frame 2

```auto
this.gotoAndPlay(1);

```

And, of course, my movie starts on frame 3.

What I am wondering is, rather than have the movie automatically play when loaded to 100%, if there is a way to create a play button that shows up once it is loaded to 100% that the visitor then clicks to begin the movie.

If so, how would the above code be modified? And what would the button’s code be?

Thank you 🙂
