Boas,

estou aqui a tentar estender da Alert para poder adicionar aquelas
limitações de drag ao utilizador, mas não consigo depois chamar este
componente... e também não consigo fazer override do show() nem do
okLabel
Fiz isto para um componente estendido do TitleWindow e resultou

package CentralPackage.BasicControls
{
        import mx.controls.Alert;
        import mx.core.FlexGlobals;

        public class MyAlert extends Alert
        {
                public function MyAlert()
                {
                        super();
                }

                override protected function 
updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
                {
                        super.updateDisplayList(unscaledWidth, unscaledHeight);

                        var applicationWidth : Number =
FlexGlobals.topLevelApplication.width;
                        var applicationHeight : Number =
FlexGlobals.topLevelApplication.height;

                        if (x + width > applicationWidth)
                        {
                                x = applicationWidth - width;
                        }
                        else if (x < 0)
                        {
                                x = 0;
                        }

                        if (y + height > applicationHeight)
                        {
                                y = applicationHeight - height;
                        }
                        else if (y < 0)
                        {
                                y = 0;
                        }
                }
        }
}

-- 
Recebeu esta mensagem porque está inscrito no grupo "Mailing List da Comunidade 
Portuguesa de Rich Internet Applications - www.riapt.org" dos Grupos do Google.

Para publicar uma mensagem neste grupo, envie um e-mail para 
[email protected].
Para anular a inscrição neste grupo, envie um e-mail para 
[email protected].
Para ver mais opções, visite este grupo em 
http://groups.google.com/group/riapt?hl=pt-PT.

Responder a