El caso es que hay un menú que enlaza a otras zonas de la película. Creo un nuevo keyframe, ajeno a todo código de esta galería, incluso he probado de meterle una capa de color por encima, crear un frame blanco! ¡he probado con todos los métodos que conozco! El código sigue cargándose y la galeria está activa siempre en todos los frames y por encima de cualquier capa!
Este es el código, colocado en el primer frame.
(He quitado unas 200 líneas de código centrales, por el texto máximo).
Código:
¿Alguien sabe la fórmula para parar a ese monstruo en los frames restantes?import flash.display.BitmapData; import flash.geom.Matrix; import flash.geom.Rectangle; import flash.geom.Point; import mx.transitions.Tween; var imageBmp:BitmapData; //setting the width of the squares var widthSq:Number = 80; //setting the speed of the squares disappear; var speedChart = 5; //time to wait lo load another image var nbSpeedPhoto:Number = 3000; //Setting the minimum and maximum alpha for controls container and updating timer var nbACMin:Number = 10; var nbACMax:Number = 65; var nbACUpd:Number = 40; //Setting the minimum and maximum alpha for textField Container var nbATMin:Number = 0; var nbATMax:Number = 100; var nbABMin:Number = 0; var nbABMax:Number = 65; //Setting the color for textField Container and font title var nbATBackColor:Number = 0x000000; var nbATFontColor:Number = 0xFFFFFF; //Setting the right margin and top margin for controls var nbRightMC:Number = -4000; var nbTopMC:Number = -4000; //Setting the bottom margin for title and its height var nbBottomMT:Number = -4000; var nbHeightMT:Number = -4000; //Init Slider viewer var bbPlay:Boolean = true; //Setting the position and dimesion of the main container var xMask:Number = -350; var yMask:Number = 108; var wMask:Number = 1700; var hMask:Number = 400; //initial state of FullScreen and AutoPlaying buttons var bbFull:Boolean = false; var bbAnimating:Boolean = false; var bbEnableTitle:Boolean = false; var bbActiveTitle:Boolean = false; //setting the first image number to load var imageNum:Number = 0; var imageLast:Number; //initial Photo var nbPhoto:Number = 0; //timer variables var nbTimerNow:Number = 0; var nbTimerNext:Number = nbSpeedPhoto; /*********Arrays*******************/ //used for load XML values var arPhotoPath:Array = new Array(); var arPhotoTitle:Array = new Array(); /**Setting listener to load images**********/ var listener:Object = new Object(); listener.onLoadComplete = function(imageClip:MovieClip):Void { if (imageNum>0) { imageBmp = new BitmapData(mainClip["image"+imageLast]._width, mainClip["image"+imageLast]._height); imageBmp.draw(mainClip["image"+imageLast],new Matrix()); imageClip._alpha=0; var sqBmp:BitmapData; var x:Number = 0; var y:Number = 0; var bt:Tween = new Tween(gridLines, "_alpha", None, gridLines._alpha, 50, 0.5, true); bt.onMotionFinished=function(){ imageClip._alpha=100; for (var i:Number = 0; i<rows; i++) { for (var j:Number = 0; j<cols; j++) { sqBmp = new BitmapData(widthSq, widthSq); x = j*widthSq; y = i*widthSq; sqBmp.copyPixels(imageBmp,new Rectangle(x, y, widthSq, widthSq),new Point(0, 0)); cloneClip.createEmptyMovieClip("clone"+imageLast,cloneClip.getNextHighestDepth()); makeSq(sqBmp,i,j); } } } } else { bbAnimating = false; imageNum++; nbTimerNext = getTimer()+nbSpeedPhoto; } //unloadMovie(mainClip["image"+imageLast]); //bbAnimating = false; bbEnableTitle = true; mcText.tfToolTip.text = "Photo "+String(nbPhoto+1)+" of "+String(xmlLength)+": "+arPhotoTitle[nbPhoto]; mcText.tfToolTip.setTextFormat(myformat); }; var imageLoader:MovieClipLoader = new MovieClipLoader(); imageLoader.addListener(listener); //drawing a square function makeARectangle(mc:MovieClip, x:Number, y:Number, w:Number, h:Number, nbColor:Number, nbAlpha:Number) { mc.lineStyle(1,nbColor,0); mc.beginFill(nbColor,nbAlpha); mc.moveTo(x,y); mc.lineTo(x+w,y); mc.lineTo(x+w,y+h); mc.lineTo(x,y+h); mc.lineTo(x,y); mc.endFill(); } //for loading external XML var xmlPhotos:XML = new XML(); xmlPhotos.onLoad = function() { xmlLength = this.firstChild.childNodes.length; for (var i:Number = 0; i<xmlLength; i++) { arPhotoPath[i] = (this.firstChild.childNodes[i].attributes.path); arPhotoTitle[i] = (this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue); } imageLoader.loadClip(arPhotoPath[0],mainClip["image"+imageNum]); bbAnimating = true; initPhoto = setInterval(initPlay, 200); }; /****Run XML*****************************************/ xmlPhotos.ignoreWhite = true; xmlPhotos.load("Sq2Alpha-photos.xml");
¡Un Saludo!
Muchas gracias por adelantado.