Preloader of my own animation

How do I create a preloader with my own animation?

I’ve already created the animation, so can I get it to play in rythm with % loaded?

PercentageLoaded=(getBytesLoaded100)/getBytesTotal;
frameToGo=Math.round((numberOfFrames
PercentageLoaded)/100);
myAnimation.gotoAndStop(frameToGo);

And I customize FrameToGo and myAnimation?

What eki is saying is:

Your animation is say, 50 frames long.

To make it advance with the % loaded, divide bytes loaded by bytes total (as in any preloader), multiply that by the number of frames in your animation (in our case, 50), and round that number, since you can’t go to partial frames.

Then tell your animation to go to this frame number with ‘animation.gotoAndPlay(thatNumber)’.

Right eki? Don’t wanna step on anyones toes here.

Maybe this helps
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=32382

I’m so stupid… tell me what I’m doing wrong? :a: