I am loading a video, and I have a:
This converts the loaded bytes of the totoal size to a percentage:
var btsLoaded:Number = Math.round(my_ns.bytesLoaded/my_ns.bytesTotal * 100);
what I need to do, is get the loaded amount, get the width of the timeLine, and figure how wide the preloader should be. So...
100% loaded needs to equal the width of the timeLine
50% loaded needs to equal the half the width of the timeLine
and so on...
this works the same as YouTube's video loader, and all the others.
controlsBG.timeLine.vidLen._width // timeLine width