Código PHP:
   var cargador_lv:LoadVars = new LoadVars();
cargador_lv.onLoad = function(exito) {
    if (exito) {
        numero_images = this.numero_images;
    } else {
        numero_images.text = "Error!! :(";
    }
    return numero_images;
};
cargador_lv.load("images/novedades.txt");
numero_images = //aqui que tengo q poner para que pille el return de la funcion;
valorAleatorio = 0+Math.round(Math.random()*numero_images);//aqui no llega la variable, porq?
this.createEmptyMovieClip("img_mc", ++nivel);
img_mc._x = 0;
img_mc._y = 0;
img_mc.loadMovie("images/novedades/foto_novedades/0"+valorAleatorio+".jpg");
this.createEmptyMovieClip("bucle_mc", ++nivel);
bucle_mc.onEnterFrame = function() {
    if (por != 100) {
        loading_txt.text = "Cargando";
        por = Math.round((img_mc.getBytesLoaded()/img_mc.getBytesTotal())*100);
        por_txt.text = (Math.round(img_mc.getBytesLoaded()/1024))+"Kb de "+(Math.round(img_mc.getBytesTotal()/1024))+"Kb "+por+"%";
    } else {
        this.unloadMovie();
        img_mc._width = 98;
        img_mc._height = 98;
        nextFrame();
    }
};
stop(); 
    
 
 
 
