hi all, im having a problem, take a look.

this is my xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
		<banner id="1" sourceFile="banner1.swf" clickurl="http://www.nsimex.com" seconds="10" />
		<banner id="2" sourceFile="banner2.swf" clickurl="http://www.prolincmex.com" seconds="20" />
		<banner id="3" sourceFile="banner1.swf" clickurl="http://www.google.com" seconds="30" />
		<banner id="4" sourceFile="banner2.swf" clickurl="http://www.yahoo.com" seconds="40" />
		<banner id="5" sourceFile="banner1.swf" clickurl="http://www.hotmail.com" seconds="50" />
		<banner id="6" sourceFile="banner2.swf" clickurl="http://www.esmas.com" seconds="60" />
		<banner id="7" sourceFile="banner1.swf" clickurl="http://www.f1.com" seconds="70" />
		<banner id="8" sourceFile="banner2.swf" clickurl="http://www.cart.com" seconds="80" />
thats ok, then my actionscript is this:
//first we create/define the variables we are going to work with
var bannerID = new Array();

//create new xml object and set ignoreWhite true.
bannerFX_xml = new XML();
bannerFX_xml.ignoreWhite = true;
// if sucess we recall a function wich will be the parser of our module.
bannerFX_xml.onLoad = function (sucess) {
	if (sucess)	{
//we now load our module url
// now we define our function.
function processBannerFX(xmlDoc_xml) {
	nodeList = bannerFX_xml.firstChild.childNodes; 
	nodeListLength = nodeList.length;
	for (i = 0; i < nodeListLength;  i++) {
		// we create an array to store our information despite of how many banners we have.

		bannerID['id'+i] = nodeList[i].attributes.id;
		bannerID['sourceFile'+i] = nodeList[i].attributes.sourceFile;
		bannerID['clickUrl'+i] = nodeList[i].attributes.clickurl;
		bannerID['seconds'+i] = nodeList[i].attributes.seconds;


trace (bannerID['sourceFile0']);

//Button linkage
button.onRelease = function () {
trace (bannerID['sourceFile0']);

everything works fine, the thing that extrange me is that when i make the "trace" on the button action (last line of code) that works fine, but when i make the "trace" outside any function i get "undefined".

can someone please help me?
what im trying to do is a banner system, where you can have multiple banners, so im trying to do a "loadMovieNum(bannerID['sourceFile0'], 2);" but thats when i get the "undefined" error.

what im doing wrong?

thank you.