So my idea is to create a flash interactive that functions as vocabulary flash
cards for online language courses. I would create a flash shell to display the
vocab terms and definitions, which would be listed in an xml file. That way I
have my .swf shell that I can recycle for any course, and just plug in a new
xml file for a new class. I want it to have the foreign language term showing,
you hit a button and the English definition appears under it. Then you hit a
"next term" button and it loads the next term in the xml file.

I can get it to load and display the first term and definition, but I am
clueless about how to get it to progress to the next listed term using a
button. Here is my code and my cheesy xml:

Any help in figuring how to display the next term would be greatly appreciated.


//----section describing how to link to an external xml file----------
var testing_xml:XML;
var xmlReq:URLRequest = new URLRequest("testing.xml")
var xmlLoader:URLLoader = new URLLoader();
//--------end xml loading, plus the xmlLoaded function--------------------

var xml:XML;
var xmlList:XMLList;


function xmlLoaded(event:Event):void
{
testing_xml = new XML(xmlLoader.data);
lesson_txt.text = testing_xml.lesson1.@id;
term_txt.text = testing_xml.lesson1[0].term[0];
def_txt.text = testing_xml.lesson1[0].def[0];
/*xmlList = testing_xml.lesson1[0].children();
trace(xmlList);*/
}


xmlLoader.load(xmlReq);
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);


now to the xml:
<?xml version="1.0" encoding="utf-8"?>
<vocab>
<lesson1 id="This is the vocab for lesson 1">
<term>word</term>
<def>my annoying agreement</def>
<term>your mom</term>
<def>my stupid response to stupidness</def>
<term>tiredness</term>
<def>my general state of existence</def>
<term>I speak German!</term>
<def>Güten Tag ßäboön fäce!</def>
</lesson1>
<lesson2 id="This is the vocab for lesson 2">
<term>craptastic</term>
<def>sarcastic utterance of aggravation</def>
<term>allergies</term>
<def>spring has sprung</def>
<term>video games</term>
<def>what keeps me from going postal</def>
</lesson2>
</vocab>