# Preloading mclip.onEnterFrame Help

**URL:** https://forum.kirupa.com/t/preloading-mclip-onenterframe-help/181995
**Category:** flash
**Created:** [March 14, 2006, 7:51pm UTC](https://forum.kirupa.com/t/preloading-mclip-onenterframe-help/181995 "2006-03-14T19:51:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![this](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/this/32/669_2.png) [@this](https://forum.kirupa.com/u/this)
#### Post date: [March 14, 2006, 7:51pm UTC](https://forum.kirupa.com/t/preloading-mclip-onenterframe-help/181995/1 "2006-03-14T19:51:18Z")

</div>

hi … i m trying create one EnterFrame function in movieclip that show percentage loaded. this is my script:

```auto

[COLOR=DimGray]/*
this movie code be in frame inside movieclip
when load external swf in this movieclip automatic preload
*/[/COLOR]
this.onEnterFrame = function() {
    var totBy = this.imagem.getBytesTotal();
    var loadBy = this.imagem.getBytesLoaded();
    var getBy = loadBy/totBy;
    //#
    if (totBy > loadBy) {
        this.texto.visible = true;
        this.texto.text = Math.round(getBy*100)+"%";
    };
    if (totBy = loadBy) {
        this.texto.text = "";
    };
};

```

👼  
Anyone can help me ?  
Thanks in advance and wating …
