Your XML seems to be missing a collection element to hold all of the mains
<mains>
<main>...</main>
<main>...</main>
<main>...</main>
</mains>
If you are missing the "mains" entries, the second main element is just
an orphan and not related to the first one.
If you try to access your XML from Firefox it displays an error
XML Parsing Error: junk after document element
Location: http://fari.kentandangela.com/site_tree.xml
Line Number 256, Column 1:<main label="Limited Edition Prints"
content="true">
^
I hope that this helps.
Ron
Kent Humphrey wrote:
http://fari.kentandangela.com
This is a website I am days away from delivering, and today I'm
getting a crazy problem.
The menu structure is loaded from an xml file. When I view this on the
web, or preview from Flash, the 5th item of the main menu doesn't
display.
When I do "simulate download" after previewing it, the 5th item IS there!
What do you see? I've got fast broadband here, but surely it's not
skipping over a part of the file, the exact same part each time I load
it??
This menu system has been working fine for over a week now...
Changing the order of the items in the xml file has no difference,
it's always the 5th item that wont display, not matter which of my
items is in 5th place.
Here is the code to generate the menu items, of course it's looping
through them so all items are getting exactly the same instructions...
[code]
// build as many root menu items as listed in the xml
for (var i:Number = 0; i<as2obj.main.length; i++) {
tempLabel = as2obj.main[i].attributes.label.toLowerCase();
tempMC = mainMenu.attachMovie("menu_item", tempLabel,
mainMenu.getNextHighestDepth(), {_x:550, _y:i*20+48});
tempMC.level = "main";
tempText = tempMC.createTextField("label_text", 1, 0, 0, 200, 20);
tempText._visible = false;
tempText.autoSize = "left";
tempText.text = tempLabel.toUpperCase();
tempText.antiAliasType = "advanced";
tempText.embedFonts = true;
tempText.selectable = false;
tempText.setTextFormat(menu_fmt);
tempText._visible = true;
trace("text: "+tempMC);
}[/code]
(Note, I am using Sephiroth's XML2Obj class to handle the parsing of
the xml file - as you can see it's reading everything else correctly)
The return from that trace statement is as you expect, it returns the
correct MC, so it's definitely being created.
Anyone got any ideas? I've been hammering away at this problem for
about 4 hours now :angry:
Flash 8 Pro, WinXP, published to AS2, Flash Player 8, same issue on
Firefox and IE.
XML file here http://fari.kentandangela.com/site_tree.xml
.swf here http://fari.kentandangela.com/fari.swf
ignoreWhitespace = true/false isn't making any difference.
Excuse the XML, it's my first, so it might not be structured correctly...
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders