Comunidad de diseño web y desarrollo en internet online

Navegar en varias mxml

Citar            
MensajeEscrito el 17 May 2009 06:14 pm
Hola,! el caso es que he hecho un programa en flex y gráficamente consta de unas mxml aplication que mediante botones puedes cambiar de unas a otras. El caso es que no se porque no puedo hacer más de un evento cada vez q arranco el programa.
Un vez que he hecho algo, ya no puedo hacer nada más, ni siquiera mover la barra desplazadora de pantalla.
El error que me sale es :

ArgumentError: Error #2025: El objeto DisplayObject proporcionado debe ser un elemento secundario del llamador.
at flash.display::DisplayObjectContainer/getChildIndex()
at mx.managers::SystemManager/getChildIndex()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1652]
at mx.managers::SystemManager/mouseDownHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3439]


El caso es que no se qué hago mal, lo mismo los documentos mxml no tienen que ser aplication si no modulos o algo,pero es que no tengo ni idea del tema:(

Alguien sabe algo??

Muchiiisisiisismas gracias!
Irene

Por Isb

6 de clabLevel



 

firefox
Citar            
MensajeEscrito el 18 May 2009 11:36 am
En principio si, tienes un solo Application, el resto módulos si cargan externamente, componentes si usas algún sistema de navegación basado en ViewStack o states

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 18 May 2009 01:10 pm
ASI es ejemplo de eso:

Código :

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top"
    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">
    
    <mx:Panel title="ViewStack Container" layout="vertical" color="0xffffff" borderAlpha="0.15" height="240" width="500"
         paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
         
         <mx:Text width="100%" color="0x323232" textAlign="center"
            text="Use the Button controls to change panels of the ViewStack container."/>

        <mx:HBox borderStyle="solid" width="100%" color="0x323232" horizontalAlign="center"
            paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5">
            
            <mx:Button id="searchButton" label="Search Panel"
                click="myViewStack.selectedChild=search;"/>
            <mx:Button id="cInfoButton" label="Customer Info Panel"
                click="myViewStack.selectedChild=custInfo;"/>
            <mx:Button id="aInfoButton" label="Account Panel"
                click="myViewStack.selectedChild=accountInfo;"/>
        </mx:HBox>

        <!-- Define the ViewStack and the three child containers and have it
        resize up to the size of the container for the buttons. -->
        <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%" color="0x323232">
        
            <mx:VBox id="search" label="Search" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" >
                <mx:Label text="Search Panel" width="100%" textAlign="center" paddingTop="10" />
                <mx:HBox width="100%" horizontalAlign="center" >
                    <mx:TextInput id="Searchtxt" width="200" />
                    <mx:Button label="search" click="Searchtxt.text=''" />
                </mx:HBox>
            </mx:VBox>
            
            <mx:VBox id="custInfo" label="Customer Info" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" horizontalAlign="center" >
                <mx:Label text="Customer Info" width="100%" textAlign="center" paddingTop="10" />
                <mx:HBox width="100%" horizontalAlign="center">
                
                    <mx:Label text="Email Address"/>
                    <mx:TextInput id="email" width="200"/>
                    <mx:Button label="Submit" click="email.text='';" />
                </mx:HBox>
                
            </mx:VBox>
            
            <mx:VBox id="accountInfo" label="Account Info" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" >
                <mx:Label text="Account Info" width="100%" textAlign="center" paddingTop="10" />
                <mx:HBox width="100%" horizontalAlign="center">
                    <mx:Button label="Purchases" />
                    <mx:Button label="Sales" />
                    <mx:Button label="Reports" />
                
                </mx:HBox>
            </mx:VBox>
            
        </mx:ViewStack>
        
    </mx:Panel>
</mx:Application>

suete.es todo.

Por xcom

Claber

530 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.