I put this code on the first frame of my game:


addEventListener(Event.ENTER_FRAME, loadProgress);

function loadProgress(event:Event) {
// get bytes loaded and bytes total
var movieBytesLoaded:int = this.root.loaderInfo.bytesLoaded;
var movieBytesTotal:int = this.root.loaderInfo.bytesTotal;

// convert to KiloBytes
var movieKLoaded:int = movieBytesLoaded/1024;
var movieKTotal:int = movieBytesTotal/1024;

// show progress
progressText.text = "Loading: "+movieKLoaded+"K/"+movieKTotal+"K";

// move on if done
if (movieBytesLoaded >= movieBytesTotal) {
removeEventListener(Event.ENTER_FRAME, loadProgress);

But in the internet the preloader doesn't show up unti the game has already loaded.

So how can i make the preloader how up and tell me how much the game has loaded.

thanks for your help