I didn't understand the question at first, but I think I do now o.O
angelhdz, I think he wants everything to happen only in 1 Frame, and your code is the answer, but where it says 'load desired xml', instead of that, he can just make a function (not really sure if you've familiarized yourself with functions yet, but if you haven't, then you should. They were a bit confusing for me at first, but once I learnt them, they're REALLY useful and awesome! Here's a
TUTORIAL)
Try this (courtesy of angelhdz for base code):
Actionscript Code:
function loadXML(xmlFile){
delete xml.onLoad; // to not make multiple XML's load at once
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(){
// load XML into comboBox or textBox here
}
xml.load(xmlFile);
}
mc1.onPress=function(){
loadXML("file1.xml");
}
mc2.onPress=function(){
loadXML("file2.xml");
}
Also, angelhdz, one more thing, you know when you put text into your code such as "load xml here", well here's a tip, comment it out, so that some keywords don't get recognized as AS tags and get highlighted:
Actionscript Code:
mc1.this.onPress=function{
// load desired xml
}
mc2.this.onPress=function{
// load desired xml
}
Looks better, right ;)? Also, what does mc1.this mean??? I'm really confused, please tell me :)