Comunidad de diseño web y desarrollo en internet online

Cambiar entre mxml

Citar            
MensajeEscrito el 02 Oct 2009 12:13 am
Buenas, tengo el siguiente problema, Tengo un proyecto con varios archivos mxml y quiero likearlos entre si, que aprete un boton y se valla hacia otro diseño o mxml.

Una ayuda porfavor.

Gracias

Por ivillacu

1 de clabLevel



 

chrome
Citar            
MensajeEscrito el 02 Oct 2009 02:26 am
lo que debes es colocarlos en un viewstack o bien usar el swfaddress o bien colocarlos en linkbar hay muchas maneras cumpila

Por xcom

Claber

530 de clabLevel



 

firefox
Citar            
MensajeEscrito el 02 Oct 2009 11:32 am
Xcom, una consulta... como lo coloco en un viewstack? si fuera un componente lo llamo con ModuleLoader, y al Mxml? Tenés algún ejemplo? Gracias!!!!!!!

Por xchacalx

Claber

133 de clabLevel



 

firefox
Citar            
MensajeEscrito el 02 Oct 2009 07:34 pm
cod

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>

Fijate que el stack esta llamando a elementos que estan en el propio mxml, entonces para cargar modulos y compomentes deberas importarlos y cambiar a los hijos del stack o bien con linkbar tambien se puede

Por xcom

Claber

530 de clabLevel



 

firefox
Citar            
MensajeEscrito el 03 Oct 2009 01:14 pm
Gracias!

Por xchacalx

Claber

133 de clabLevel



 

firefox
Citar            
MensajeEscrito el 03 Oct 2009 04:01 pm
No se si me explique bien, lo que nececito es por ejemplo tengo el logo que quiero que aparesca primero, esto en 1 mxml, y en otro mxml tengo el login y quiero hacer una transicion entre ellos pero no logro hacerlo funcionar que se cambien despues de cierto tiempo.

saludos..

si tienen algun codigo que puedan dar para guiarme mejor

Por ivillacu

1 de clabLevel



 

chrome
Citar            
MensajeEscrito el 05 Oct 2009 02:30 am
revisa la documentacion de transicion en google o o en la pagina de adobe

Por xcom

Claber

530 de clabLevel



 

firefox

 

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