J'ai un problème d'affichage de mon application
Je suis en train de développer un site internet avec flex et je voudrais que ma page soit centrer par rapport à l'écran.
En cherchant j'ai trouvé la propriete verticalCenter="middle" du composant mx:Application. Mais ca ne change pas mon problème
Je pense qu'il y a quelque chose dans mon code qui bloque l'action de cette propriete
Voila mon code
Merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="*" pageTitle="RSID" backgroundColor="#000000" creationComplete="init_aff()" verticalCenter="middle" width="100%" height="100%"> <mx:Style source="main.css"/> <mx:Script> <![CDATA[ import mx.controls.Alert; public function init_aff():void{ bar_menu.selectedIndex=-1; } public function init():void{ currentState='init_aff'; } ]]> </mx:Script> <mx:states> <mx:State name="init_aff"> <mx:SetProperty target="{fla}" name="visible" value="false"/> <mx:SetProperty target="{fla}" name="width" value="0"/> <mx:SetProperty target="{fla}" name="height" value="0"/> <mx:SetProperty target="{site}" name="visible" value="true"/> <mx:SetProperty target="{site}" name="width" value="100%"/> <mx:SetProperty target="{site}" name="height" value="100%"/> <mx:SetProperty target="{bandeau}" name="visible" value="true"/> <mx:SetProperty target="{bandeau}" name="source" value="icons/bandeau.swf"/> <mx:SetProperty target="{hr}" name="styleName" value="styletrait"/> <mx:SetProperty target="{hr}" name="visible" value="true"/> </mx:State> </mx:states> <mx:SWFLoader id="fla" height="100%" width="100%" horizontalAlign="center" source="icons/accueil.swf" useHandCursor="true" buttonMode ="true" click="init()" /> <mx:Canvas id="site" width="0" height="0" visible="true" xmlns="*" backgroundSize="100%" backgroundImage="icons/back.PNG"> <mx:VBox> <mx:SWFLoader id="bandeau" height="100" width="1024" visible="false" horizontalAlign="center"/> <mx:HRule id="hr" width="1024" visible="false"> </mx:HRule> <mx:HBox > <mx:VBox horizontalAlign="center"> <mx:ToggleButtonBar id="bar_menu" width="150" dataProvider="{Menu}" direction="vertical" styleName="menu" useHandCursor="true" buttonMode ="true" /> <mx:HBox> <mx:Label color="#ffffff" text="Email : " styleName="labEmail" textDecoration="none"/> <mx:Label text="contact@rsid.fr" styleName="labEmail" useHandCursor="true" buttonMode="true" mouseChildren="false" click="bar_menu.selectedIndex=6"/> </mx:HBox> </mx:VBox> <mx:ViewStack id="Menu" width="100%" height="100%" > <AccueilView id="accueilView" label="Accueil" showEffect="WipeDown" hideEffect="WipeUp" contactView="Menu.selectedChild = contactView;" /> <LogicielsView id="logicielsView" label="Logiciels" showEffect="WipeDown" hideEffect="WipeUp" /> <ServiceView id="serviceView" label="Services" showEffect="WipeDown" hideEffect="WipeUp" /> <VideoIPView id="videoIPView" label="Video IP" showEffect="WipeDown" hideEffect="WipeUp"/> <ReseauIPView id="reseauView" label="Réseaux IP" showEffect="WipeDown" hideEffect="WipeUp" /> <TelephonieView id="telephonieView" label="Téléphonie IP" showEffect="WipeDown" hideEffect="WipeUp" /> <ContactView id="contactView" label="Contactez nous" showEffect="WipeDown" hideEffect="WipeUp" /> <ClientView id="clientView" label="Espace Client" showEffect="WipeDown" hideEffect="WipeUp" accueilView="Menu.selectedChild = accueilView;"/> <MaintenanceView id="maintenanceView" label="Maintenance" showEffect="WipeDown" hideEffect="WipeUp" accueilView="Menu.selectedChild = accueilView;"/> </mx:ViewStack> </mx:HBox> </mx:VBox> </mx:Canvas> </mx:Application>
Partager