# Preloader duration = movieclip duration

**URL:** <https://forum.kirupa.com/t/preloader-duration-movieclip-duration/285666>\
**Category:** Uncategorized\
**Created:** [April 3, 2009, 5:09pm UTC](https://forum.kirupa.com/t/preloader-duration-movieclip-duration/285666 "2009-04-03T17:09:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skull\_demon](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@skull\_demon](https://forum.kirupa.com/u/skull_demon)\
**Post date:** [April 3, 2009, 5:09pm UTC](https://forum.kirupa.com/t/preloader-duration-movieclip-duration/285666/1 "2009-04-03T17:09:21Z")

</div>

Hi there, i’ve been looking everywhere, however i can’t find a solution for my problem…  
That said, is it possible to make the duration of a movieclip equal the duration of the preloader, i mean is it possible to make something like, the time the preloader needs to reach the 100% = the duration of the movieclip?  
i’m using AS 3.0 and flash CS4  
i would appreciate any help.

just in case it helps here is my code for the loader:

```auto
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);

  
function loadProgress(event:ProgressEvent):void {
    var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
        var total:Number = this.stage.loaderInfo.bytesTotal;
    var loaded:Number = this.stage.loaderInfo.bytesLoaded;
        percentLoaded = Math.round(percentLoaded * 100);
    trace("Loading: "+percentLoaded+"%");
    loader2_txt.text = (percentLoaded)+ "%";    
    MovieClip(carro2).duration = percentLoaded

    }

```

Thanks in advance 😉
