I've build a multiple choices tree menu, which is quite
You start with, say, three entries : A,B,C
If you click A, it will "store" choice A and open "D,E,F,G"
and so on...
Each sub menu is actually a clip that appears in another
frame of its
parent (DEFG is on frame 2 of ABC movie clip).
You can "unselect" any choice at any level and it should
children. And selecting a value unselects its brothers.
Everything was working OK until I had an extra constraint :
children at the same level are not "exclusive" (that is you
between "D or E" and "F or G" but they are still at the same
that's where my routine does not work any more...)
So I was thinking to "hard code" unselection, as I've got a
number of levels. That is, if a frame is left, it will erase
Say, if I go back to "main movie - frame 1", its frame 2 will
"delete D,E,F,G" on exit. And so would its nested clips if
they are open
(visible on stage)
Any idea how to achieve this ? Some kind of "onExitFrame" ?
I don't post my recursive routine because it's been altered
so much I
would spend to much time making it legible... Sorry..
It works ! I cleaned up my recursive routine by passing an
"neighbours" to visit that I "pop" each time (and I
discovered that you
have to use slice() to have a new array instead of a pointer
The main problem was in fact targeting neighbours that were
not in the
same parent movie clip. And then came "targetPath(this)" that
path for each button on root !