Groups | Blog | Home
all groups > flash data integration > december 2004 >

flash data integration : I broke the Tree Component...Help!


rtnews0423
12/22/2004 3:24:32 PM
Here is my problem... I have a movie that is called "frame". Within frame
there are nav buttons and a tree component that uses an XML file to determine
titles and load other movies. The way that all of this works is... when a user
opens a group of movies, each movie loads the movie titled "frame" as I
explained above. The movie titled "frame" has a tree in it that uses an
external XML file. When I select a leaf node on the tree, the onChange Event
checks to see if it is a branch or leaf and if it is a leaf it loads a new root
movie using a path attached to that node by a "moviepath" attribute. This root
movie in turns loads a new "frame" movie, that loads the tree component again.


Here is the problem, when I select the leaf node and load the two movies, the
tree breaks. The tree does have the root nodes present, but no child nodes.
When you select a root node and try to open the folder(or node), not only does
it not have child nodes, it also freezes. You cannot select any other root
nodes to open.

The odd thing about this is that I also have a continue button, that loads the
"frame" movie and a new root movie using the same procedure, and the tree works
fine. So... when I load a movie by selecting a node on the tree component the
loaded movies break the tree component, when I load a movie selecting a button
outside the tree component, the tree works well. What am I missing? Can
anyone give me some direction?
rtnews0423
12/29/2004 8:14:27 PM
Well, I have not received any replies to my post.... So I'll reply myself.
recap: Tree Component locks-up after one of its children is selected and that
selection loads a new mc that contains the tree component. So if a user clicks
on a tree element it cannot load a new movie with the same instance of the
initial tree component in it.
Problem: There seems to be a problem with components in general when they are
reloaded into another mc, see
http://www.macromedia.com/support/flashremoting//ts/documents/combobox.htm and
also see http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19278.
To go further than what Macromedia has explained, if an instance of a
component is loaded into the root level, then upon an event it is reloaded into
the root, the component breaks or locks-up. However, if you reload a component
into any other level, but 0 and do not load a new root or 0 level the component
will work as normal.
WorkAround: Throw-up another mc that confirms this loading of a new movie.
Send that movie clip's button the path to the new movie and it will work fine.
If you do not want a confirm mc or window, then try sending an invisible button
the movie path. Upon rolling over or rolling out the invisible button, send
the user to the new movie.

If someone else has any other ideas and/or corrections please be my guest and
reply.

Thanks
RTNEWS:brokenheart;
AddThis Social Bookmark Button