I have an xml file which i read in in flash and putting every ‘item’ beneath another one with attachMovie.
My xml looks like
<work>
<item>
<title>
<desc>
<detail>
</item>
<item>
...
</item>
</work>
Actions on first frame with a movieclip in the library (actionscript export activated - name: itemClip - itemName and itemDetails are the two dynamic textfields in the movieclip ‘itemClip’)
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {
if (success) {
menuItem = this.firstChild.childNodes;
for (var i=0; i<menuItem.length; i++) {
item = _root.attachMovie("itemClip", "itemClip" + i, i);
//put item on stage: 50 is the start x and y value from top left
//30 is the value to add to y for each new itemClip
item._x = 50;
item._y = 50+20*i;
item.itemName.text = menuItem*.childNodes[0].firstChild.nodeValue;
item.itemDetails.text = menuItem*.childNodes[1].firstChild.nodeValue;
item.myUrl = menuItem*.childNodes[2].firstChild.nodeValue;
item.onRelease = function() {
getURL(this.myUrl,"_blank");
}
}
}
}
menuXml.load("work.xml");
What i want is the following :
-
The movieclip is now generated on the stage… but i would like to have it with a scroller… and with a mask on it… or in a scrollpane…
-
I also would like to now if I click on an item, how can i pass a the value of a variable to another piece of actionscript in wich i will show the details in a dynamic textfield (or multiple textfields)… Just like in php : a list of all items and when you click on one, you’ll get the details of that item.
I only want to use flash with xml… no php if possible.
Thanks to the person who can help me out on this !!