Código :
function crearPrevias(num) { var marcoP:MovieClip = lienzo_previas.createEmptyMovieClip("marcoP_" + num, lienzo_previas.getNextHighestDepth()); var fotoP:MovieClip = lienzo_previas.createEmptyMovieClip("fotoP_" + num, lienzo_previas.getNextHighestDepth()); var holder:MovieClip = fotoP.createEmptyMovieClip("holder", 1); var mclP:MovieClipLoader = new MovieClipLoader(); var listenerP:Object = new Object(); fotoP.num = num mclP.addListener(listenerP); mclP.loadClip(rutaPrevias + num + ".jpg", holder); fotoP.onPress = function(){ verFotoGrande(this.num); } fotoP.onRollOver = RollOver; fotoP.onRollOut = RollOut; listenerP.onLoadStart = function(target_mc:MovieClip) { //target_mc._alpha = 0; }; listenerP.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) { attachMovie("barra_mc", "barra_mc", this.getNextHighestDepth()); var pct:Number = Math.round((bytesLoaded*100)/bytesTotal); pct_txt.text = pct+" %"; barra_mc._xscale = pct; }; listenerP.onLoadInit = function(target_mc:MovieClip) { target_mc._x = -150 + 150 * posX target_mc._y = posY; posX++; marcoP._x = target_mc._x-5; marcoP._y = target_mc._y-5; with (marcoP) { beginFill(0x000000); lineStyle(1, 0x6a6a6a, 100); lineTo(target_mc._width+10, 0); lineTo(target_mc._width+10, target_mc._height+10); lineTo(0, target_mc._height+10); lineTo(0, 0); endFill(); } var myTween:Tween = new Tween(target_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 75, 1, true); }; }
Lo que estoy intentando es que en el evento del mcloader onLoadProgress, llamar a un movieclip que tengo en biblioteca, que es una barrita, pero no consigo que aparezca en pantalla de ninguna de las maneras, quizá esté llamando mal a esta barrita de la biblioteca, pero he estado mirando el método attachMovie de la página oficial de adobe pero hay algo que estoy haciendo mal, espero que puedan ayudarme, gracias de antemano.