Probleme d'access a un object dans une VBox
Salut!
J'ai un probleme d'acces a un object qui se trouve dans une VBox.
J'arrive tres bien a y acceder s'il n'est pas dans la vbox.
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
creationComplete="onLoad()"
layout="vertical"
pageTitle="Video Conference"
backgroundAlpha="0">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
/* Auto-log if the username is know in the flashvars */
public function onLoad():void {
Alert.show(pnlChat.title);
}
]]>
</mx:Script>
<mx:ViewStack
id="vsMain"
width="100%" height="100%">
<!-- Login Panel -->
<mx:Panel
id="pnlLogin"
title="Enter your name"
width="300" height="200">
<mx:Form defaultButton="{connectSubmitButton}">
<mx:FormItem label="Name:">
<mx:TextInput
id="txtName" text="{Application.application.parameters.username}"
/>
</mx:FormItem>
<mx:Button
id="connectSubmitButton"
label="Connect"
/>
<mx:Label text="{ ( Camera.getCamera() != null ) ? '':'No camera was found!' }" />
</mx:Form>
</mx:Panel>
<mx:VBox>
<mx:Panel
id="pnlChat"
title="Chat"
width="100%" height="230">
<mx:Form defaultButton="{chatSubmitButton}" width="100%">
<mx:TextArea id="messageArea" width="100%" height="130" wordWrap="true" editable="false" />
<mx:HBox width="100%">
<mx:TextInput id="chatTxt" width="100%" />
<mx:Button
id="chatSubmitButton"
label="Submit"
/>
</mx:HBox>
</mx:Form>
</mx:Panel>
</mx:VBox>
</mx:ViewStack>
</mx:Application> |
J'essaie donc d'acceder a pnlChat. Au lancement du SWF l'alerte n'est pas affichee, je ne sais pas pourquoi.
Si j'enleve la balise <mx:VBox> qui entoure mon Panel, tout fonctionne tres bien.
Quelqu'un aurait une idee svp?
(Desole pour les accents, clavier qwerty ;) )