Buenas, yo continuo con mis problemillas que no logro resolver. Son varias
cosas pero os cuento alguno en concreto, a ver si focalizando cosas pequeñas
resuelvo el resto de fallos (uno está muy espeso después de todo el verano
currando...)

En el escenario justo donde se inicia la aplicación hay una serie de
elementos que son utililzados por clases (ya no extiendo de movieClips, solo
por composción).

Entre ellos hay una serie de botones colocados todos en la misma capa de
Flash, con distintos nombres de instancia, en concreto 5. Tres de ellos
forman parte de una botonera y los otros dos son indpendientes, uno para
imprimir, y otro para guardar.

Pues bien, en la clase principal inicializaba esos dos botones
subscribiendome a sus "release" y tal. He comentado esa parte para focalizar
mas el problema.

El tema es que cuando publico, uno de esos dos botones desaparece de
pantalla, como si lo estuviera pisando su nivel con otra cosa.

Y me doy cuenta que comentando una linea de código tal cual la pongo aquí:
<code>public static var alert:Alert;</code>
el botón aparece misteriosamente.

Esa declaración de la clase Alert no se utiliza actualmente en ninguna parte
de la aplicación, por lo que no entiendo de qué manera le afecta. He puesto
4000 traces en su constructor y en sus métodos para asegurarme y estoy
seguro =P

Por si sirve de algo os pongo el código de la clase, aunque ya os digo, que
no se está llamando por ningún lado

¿Alguna idea?

import control.items.ITM_menuPrincipal;
import net.xleon.utils.Delegate;

class control.paneles.Alert{
        private var scope:MovieClip;
        private var cont_alert:MovieClip;
        private var fondo_pantalla:MovieClip = null;
        private var acept:ITM_menuPrincipal;
        private var cancel:ITM_menuPrincipal;
        
        public function Alert(_scope:MovieClip) {
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        }
        public function alertar(_mensaje:String, funcion_true:Function,
funcion_false:Function):Void{
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                trace("Alert iniciado
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                
                trace(_mensaje);
                //trace("instancia en ultimo nivel:
"+Hogariza.scope.getInstanceAtDepth(Hogariza.scope.getNextHighestDepth()))
                fondo_pantalla =
Hogariza.scope.createEmptyMovieClip("fondo_alert",
Hogariza.scope.getNextHighestDepth());
                fondo_pantalla.attachMovie("rect_mc", "rect",0);
                fondo_pantalla._alpha = 85;
                fondo_pantalla._width = Stage.width;
                fondo_pantalla._height = Stage.height;
                fondo_pantalla._x = fondo_pantalla._y = 0;
                fondo_pantalla.onRelease = function(){trace(" ")}
                fondo_pantalla.useHandCursor = false;
                
                cont_alert = Hogariza.scope.createEmptyMovieClip("alert",
Hogariza.scope.getNextHighestDepth()+1000);
                scope = cont_alert.attachMovie("Alert","alert",0);
                //scope._visible = false;
                //trace(cont_alert)
                scope.fondo_alert_mc.onPress = Delegate.create(
this.cont_alert, this.cont_alert.startDrag );
                scope.fondo_alert_mc.onRelease =
scope.fondo_alert_mc.onReleaseOutside = Delegate.create( this.cont_alert,
this.cont_alert.stopDrag );
                scope.fondo_alert_mc.useHandCursor = false;
                //scope._visible = true;
                cont_alert._x = Stage.width / 2 - (cont_alert._width/2);
                cont_alert._y = Stage.height / 2 - (cont_alert._height);
                scope.texto_txt.text = _mensaje;
                if( (!funcion_true && !funcion_false) || (funcion_true==null
&& funcion_false==null)){
                        acept.destroy();
                        acept = new ITM_menuPrincipal(scope.cancelar_mc,
"Aceptar",0);
                        //cancelar_mc.init("Aceptar",0);
                        scope.aceptar_mc._visible = false;
                }
                else{
                        scope.aceptar_mc._visible = true;
                        acept.destroy();
                        cancel.destroy();
                        acept = new ITM_menuPrincipal(scope.aceptar_mc,
"Aceptar",0);
                        cancel = new ITM_menuPrincipal(scope.cancelar_mc,
"Cancelar",0);
                }
                //acept.removeAllEventListeners();
                //cancel.removeAllEventListeners();
                acept.addEventListener("release",Delegate.create(this,
this.cerrar, funcion_true));
                cancel.addEventListener("release", Delegate.create( this,
this.cerrar, funcion_false)); 
                
                sonar();                                        
                
        }
        private function sonar():Void{
                // reproducir un sonido de la biblioteca
        }
        private function cerrar(_funcion:Function):Void{
                trace("cerrar")
                fondo_pantalla.removeMovieClip();
                cont_alert.removeMovieClip();
                _funcion();
        }
} 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.10/976 - Release Date: 27/08/2007
18:20
 



-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------

Responder a