I´m searching ( desperately ) for some tutorial about DepthManager and Components in ActionScript and F8.
I´m getting crazy, after spending hours testing, and reading over and over the DepthManager Class reference, trying to create some ComboBoxes and Labels which insist to having their dropdown components appearing behind the container where they were created.
http://www.phdimobiliaria.com.br/fla…PanelEntry.swf
I´m back :toad:
I have all the components in some frame before I use them
What I do is
read an XML file to populate the combos
ActionScript Code:
[FONT=Courier New][LEFT]<?[COLOR=#0000FF]xml[/COLOR] [COLOR=#0000FF]version[/COLOR]=[COLOR=#FF0000]“1.0”[/COLOR] encoding=[COLOR=#FF0000]“ISO-8859-1”[/COLOR] ?>
<formulario>
<Operação>
<item code=[COLOR=#FF0000]“2”[/COLOR] descricao=[COLOR=#FF0000]“aluguel”[/COLOR] />
<item code=[COLOR=#FF0000]“1”[/COLOR] descricao=[COLOR=#FF0000]“compra”[/COLOR] />
</Operação>
<Cidade>
<item code=[COLOR=#FF0000]“1”[/COLOR] descricao=[COLOR=#FF0000]“niterói”[/COLOR] />
<item code=[COLOR=#FF0000]“2”[/COLOR] descricao=[COLOR=#FF0000]“rio de janeiro”[/COLOR] />
</Cidade>
</formulario>
[/LEFT]
[/FONT]
then inside my class that builds an FORM inside some MC, I have this function to create the combos
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]private[/COLOR] [COLOR=#000000]function [/COLOR] buildCombos COLOR=#000000 [/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#000000]**var**[/COLOR] nCombos = _thisXML.[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]childNodes[/COLOR].[COLOR=#0000FF]length[/COLOR];
[COLOR=#000000]**var**[/COLOR] yRef = [COLOR=#000080]30[/COLOR];
[COLOR=#000000]**var**[/COLOR] deltaY = [COLOR=#000080]25[/COLOR];
[COLOR=#0000FF]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]**var**[/COLOR] i = [COLOR=#000080]0[/COLOR]; i < nCombos; i++[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#000000]**var**[/COLOR] thisCombo = _thisXML.[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR];
[COLOR=#0000FF]trace[/COLOR] [COLOR=#000000]([/COLOR]i + [COLOR=#FF0000]"Label "[/COLOR] + thisCombo.[COLOR=#0000FF]nodeName[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#808080]*// Label*[/COLOR]
[COLOR=#000000]**var**[/COLOR] _thisLbl = _thisHolder.[COLOR=#000080]createClassObject[/COLOR] [COLOR=#000000]([/COLOR]Label, [COLOR=#FF0000]"lbl"[/COLOR] + i, _thisHolder.[COLOR=#0000FF]getNextHighestDepth[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];
_thisLbl.[COLOR=#000080]move[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000080]10[/COLOR], yRef + deltaY * i[COLOR=#000000])[/COLOR];
_thisLbl.[COLOR=#0000FF]text[/COLOR] = thisCombo.[COLOR=#0000FF]nodeName[/COLOR];
[COLOR=#808080]*// ComboBox*[/COLOR]
[COLOR=#000000]**var**[/COLOR] _thisCb = _thisHolder.[COLOR=#000080]createClassObject[/COLOR] [COLOR=#000000]([/COLOR]ComboBox, [COLOR=#FF0000]"cb"[/COLOR] + i, _thisHolder.[COLOR=#0000FF]getNextHighestDepth[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#808080]*// ComboBox options*[/COLOR]
[COLOR=#000000]**var**[/COLOR] nOpcoes = thisCombo.[COLOR=#0000FF]childNodes[/COLOR].[COLOR=#0000FF]length[/COLOR];
[COLOR=#0000FF]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]**var**[/COLOR] j = [COLOR=#000080]0[/COLOR]; j < nOpcoes; j++[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#000000]**var**[/COLOR] thisComboOption = thisCombo.[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR]j[COLOR=#000000]][/COLOR];
_thisCb.[COLOR=#000080]addItem[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]{[/COLOR][COLOR=#0000FF]data[/COLOR]:thisComboOption.[COLOR=#0000FF]attributes[/COLOR].[COLOR=#000080]code[/COLOR], label:thisComboOption.[COLOR=#0000FF]attributes[/COLOR].[COLOR=#000080]descricao[/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
_thisCb.[COLOR=#000080]move[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000080]70[/COLOR], yRef + deltaY * i[COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]
Using getNextHighestDepth() I get this weird behaviour as you can see at
http://www.phdimobiliaria.com.br/flash/resultsPanelEntry.swf
I made an small test with DepthManager trying to swap all getNextHighestDepth() by similar ones in DepthManager but I got confused with kCursor, kTooltip, kTop and so, and even with DepthManager the overlapping behaviour reamains the same.
What I´m looking for is some minor example how to work with it
jcanistrum:
I´m searching ( desperately ) for some tutorial about DepthManager and Components in ActionScript and F8.
I´m getting crazy, after spending hours testing, and reading over and over the DepthManager Class reference, trying to create some ComboBoxes and Labels which insist to having their dropdown components appearing behind the container where they were created.
http://www.phdimobiliaria.com.br/fla…PanelEntry.swf