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:
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 