okay here’s my AS:
stop();
cat_xml = new XML();
cat_xml.ignoreWhite = true;
cat_xml.onLoad = function (success)
{
if (success)
{trace(this);
menuItems = cat_xml.firstChild.childNodes;
for (var i=0; i<menuItems.length; i++) {
item = _root.holder.attachMovie("itemClip", "itemClip" + i, i);
item._x = 0;
item._y = 75*i;
thumbtoload = menuItems*.attributes.thumb;
viewtoload = menuItems*.attributes.view;
largeviewtoload = menuItems*.attributes.largeview;
trace(viewtoload);
trace(largeviewtoload);
item.lilimage.loadMovie(thumbtoload);
//item.onRollOver = function(){item.anim.gotoAndPlay("over");};
//item.onRollOut = function() {item.anim.gotoAndStop("up");};
item.onRelease = function() {
_root.descriptions.name.text = menuItems*.attributes.name;
_root.descriptions.info.text = menuItems*.firstChild.nodeValue;
_root.image.loadMovie(viewtoload);
}}}}
cat_xml.load("catalog.xml");
it’s starting to come together. the thumbnails load into the menu. the problems start with my onRelease function on the movie clip. you’ll see that i created a variable “viewtoload” in the same manner that i created “thumbtoload” which does work and populates the menu with the correct pictures. For some reason “viewtoload” is producing no result except loading the last image in my xml regardless of which dynamic instance of the mc (menu) you click. i’m sure it’s something really silly and noobish (new to xml/flash anyway)… here’s my xml… really simple… I just can’t understand how it works with teh “thumbtoload” but not with “viewtoload”…
any help is great
<catalog>
<item name="Mommy" thumb="images/mommysml.jpg" view="images/mommymed.jpg" largeview="images/mommylrg.jpg">This is my mommy she is the best! i love her so much! She takes good care of me!
</item>
<item name="Grandpa H" thumb="images/grandpahsml.jpg" view="images/grandpahmed.jpg" largeview="images/grandpahlrg.jpg">This is my Grandpa Haveman He earned most of his money selling oil through OPEC. I don't know what that means!
</item>
<item name="Grandpa P" thumb="images/grandpapsml.jpg" view="images/grandpapmed.jpg" largeview="images/grandpaplrg.jpg">This is my Grandpa P. He lives in the insane asylum. Don't make any sudden moves!
</item>
<item name="Grandma H" thumb="images/grandmahsml.jpg" view="images/grandmahmed.jpg" largeview="images/grandmahlrg.jpg">This is my Grandma H. She is the life of the party! She gives me 'Boomies!'
</item>
<item name="Uncle Syrup" thumb="images/syrupsml.jpg" view="images/syrupmed.jpg" largeview="images/syruplrg.jpg">This is my Uncle Syrup! He likes to play with me! He wears a hat.
</item>
<item name="Booker" thumb="images/bookersml.jpg" view="images/bookermed.jpg" largeview="images/bookerlrg.jpg">This is my doggie, 'booker!' He likes to try to steal my food. I cuddle with him sometimes
</item>
<item name="Grandma P" thumb="images/grandmapsml.jpg" view="images/grandmapmed.jpg" largeview="images/grandmaplrg.jpg">This is my Grandma P! She is excited to have me for a grandkid! She loves to read me stories!
</item>
<item name="JBUG" thumb="images/jbugsml.jpg" view="images/jbugmed.jpg" largeview="images/jbuglrg.jpg"> This is me! My mommy calls me 'sweetie pie' and my daddy calls me 'jbug!
</item>
</catalog>