bonjour
J'arrive pas a passer en reference un String vous trouverez
ci joint mon code:
teste.mxml
TitleWin.mxml
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 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="top" horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="20" viewSourceURL="srcview/index.html"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.containers.TitleWindow; [Bindable] public var wall:String='0'; private function showWindow():void { var fenetre:TitleWin=TitleWin(PopUpManager.createPopUp( this, TitleWin , true)); fenetre.fond=wall; } ]]> </mx:Script> <mx:Panel layout="vertical" color="0xffffff" borderAlpha="0.15" paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center" height="131" title="windows" x="137" y="227" width="187"> <mx:Button id="myButton" color="0x323232" height="32" label="lancer la fenetre" click="showWindow();"/> <mx:Label text="wall={wall}" width="91" color="#090808"/> </mx:Panel> </mx:Application>
d'une autre manière je veux passer la valeur de wall a 1 lorsque je clique sur "OK"
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 <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Window" x="168" y="86" status="active" showCloseButton="true" close="PopUpManager.removePopUp(this);" borderAlpha="0.75" width="154" height="122"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.controls.Text; public var fond:String; private function returnName():void { fond='1'; PopUpManager.removePopUp(this); } ]]> </mx:Script> <mx:Canvas width="124" height="70"> <mx:Button label="OK" click="returnName();" height="32" x="33.5" y="10"/> </mx:Canvas> </mx:TitleWindow>
Partager