Animated Preloader: Advance 1 frame every 10% loaded? (AS3)

Hi all, this is my first post ever:

I am needing to create a preloader that advances a 10 frame animation every 10% loaded. So there will be a percentage indicator (dynamic text) and a short animation as the load bar (10 frames).

The animation is of tape winding into a tape measure, and when it’s fully inside the loading is complete and timeline moves onto next frame.

I have been able to do this with AS2, using a combination of (stop) and (play) commands whenever the next 10% was loaded.

Here’s that code:

_root.loadPerFrame = 0.1;
_root.roll.onEnterFrame = function(){
_root.percLoaded = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";
if(_root.preloaderStart){
_root.roll.stop();
if ((_root.getBytesLoaded()/_root.getBytesTotal()) >= _root.loadPerFrame){
_root._root.loadPerFrame += 0.1;
_root.roll.play();
}
}
if((_root.getBytesLoaded()/_root.getBytesTotal())>=1){
play();
percLoadMC._alpha = 0;
}
}

Any help with this in AS3?