I'll start this message with the problem: My chat application: http://ded692cale.maximumasp.com/NetMaths111/SWF/ExplorationsBeta/NMChat.swf
When I open a client by double-clicking in the list(in order to work you need to login 2 user) and then I close it with a removeChildren() I'll get a glitch with the tab button in the TabBar. The button doesn't appear white like he should be (selected), I tried selectedIndex etc.. And everything seems to be well coded. Anyone got a suggestion? private function createTab(name:String):void { var bool:Boolean = true for (var x:Object in allChatConversation) { if (x == name && allChatConversation[x] != null) { bool = false } } if (bool) { chatTabs.visible = true var chatRoom:NMChatRoom = new NMChatRoom() chatRoom.id = "chatRoom" chatTabs.addChild(chatRoom) chatRoom.label = name allChatConversation[name] = chatRoom //this is an object to keep a track on all the chatRoom opened chatList.setFocus() if (chatTabs.numChildren == 1) { chatTabs.visible = true } chatTabs.selectedChild = allChatConversation[name] } } selectedChild work well when there's already at least one child created but when there is zero child the glitch happen. -- Merci, Guillaume Guillaume Malartre Programmeur-Analyste, Scolab 514-528-8066, 1-888-528-8066 Besoin d'aide en maths? www.NetMaths.net _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com