Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Flash/Flex > Flex > MXML
MXML Questions relatives au format MXML
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 28/05/2007, 18h59   #1
Invité de passage
 
Inscription : mai 2004
Messages : 5
Détails du profil
Informations forums :
Inscription : mai 2004
Messages : 5
Points : 2
Points : 2
Par défaut Affichage de différent MXML dans une seule page

Bonjour,
J'aimerai afficher plusieurs fichiers MXML dans une page centralisée pour créer un site.
Pour plus de détails: dans ma page main.mxml, j'aimerai avoir mon menu fixe, et dans un ViewStack, plusieurs canvas avec les différentes partie de mon site. Chaque canvas contiendrait le code contenu dans une autre page (exemple: contact.mxml).
Comment puis-je faire pour qu'il charge chaque page dans un canvas ?
Ca fait 2 jours que je cherche, mais je ne trouve pas. En meme temps je débute en flex
Merci d'avance pour vos réponses.
mel59200 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/07/2007, 10h44   #2
Invité régulier
 
Inscription : décembre 2005
Messages : 13
Détails du profil
Informations personnelles :
Âge : 31

Informations forums :
Inscription : décembre 2005
Messages : 13
Points : 5
Points : 5
Envoyer un message via Skype™ à thomasvst
Ta page contact (par exemple) doit être un définie comme composant.

Si tu reprends l'exemple
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0"?>
<!-- Simple example to demonstrate the ViewStack layout container. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
 
     <mx:Panel title="ViewStack Container Example" height="95%" width="95%" 
         paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
 
        <mx:Text width="100%" color="blue"
            text="Use the Button controls to change panels of the ViewStack container."/>
 
        <mx:HBox borderStyle="solid" width="100%"
            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%">
 
            <mx:Canvas id="search" backgroundColor="#FFFFCC" label="Search" width="100%" height="100%">
                <mx:Label text="Search Screen" color="#000000"/>
            </mx:Canvas>
 
            <mx:Canvas id="custInfo" backgroundColor="#CCFFFF" label="Customer Info" width="100%" height="100%">
                <mx:Label text="Customer Info" color="#000000"/>
            </mx:Canvas>
 
            <mx:Canvas id="accountInfo" backgroundColor="#FFCCFF" label="Account Info" width="100%" height="100%">
                <mx:Label text="Account Info" color="#000000"/>
            </mx:Canvas>
        </mx:ViewStack>
 
    </mx:Panel>
</mx:Application>
Il suffit d'isoler
Code :
1
2
3
 <mx:Canvas id="search" backgroundColor="#FFFFCC" label="Search" width="100%" height="100%">
                <mx:Label text="Search Screen" color="#000000"/>
            </mx:Canvas>
dans un fichier .mxml (New -> MXML component)
thomasvst est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 19h49.


 
 
 
 
Partenaires

Hébergement Web