For loop problem dealing with associative array

Hi. This is not html code by the way - I just used that html tag because I think it formatted my post???
I have been following tutorials but they don’t seem to cover exactly what I’m doing.

I have an associative array of values called definitionsArray which I use as references to instantiate classes in a run time shared library.
I instantiate and push the object into a new array. The problem is when I try to access or do anything basically with that new array.
As they are objects they don’t seem to like being in a display list for example.


var definitionsArray:Array;
var bubblesArray:Array;
var currentBubble:*;
var correct:uint;
var incorrect:uint;



this.definitionsArray = new Array();
this.definitionsArray.push({ sound:"AppleSound",mc:"Apple" });
this.definitionsArray.push({ sound:"BananaSound",mc:"Banana" });
this.definitionsArray.push({ sound:"BreadSound",mc:"Bread" });
this.definitionsArray.push({ sound:"CakeSound",mc:"Cake"  });
this.definitionsArray.push({ sound:"WaterSound",mc:"Water" });
this.definitionsArray.push({ sound:"TomatoSound", mc:"Tomato" });
this.definitionsArray.push({ sound:"SandwichSound",mc:"Sandwich" });
this.definitionsArray.push({ sound:"PizzaSound",mc:"Pizza" });
this.definitionsArray.push({ sound:"PearSound",mc:"Pear" });
this.definitionsArray.push({ sound:"OrangeSound",mc:"Orange" });

getData("library/food.swf", definitionsArray);

function getData(libreria:String, matriz:Array)
{
    this.definitionsArray = matriz;
    var context:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);

    var loader:Loader = new Loader();
    var req:URLRequest = new URLRequest(libreria);

    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onAssetsLoaded);
    try
    {
        loader.load(req);
    }
    catch (e:Error)
    {
        trace("Asset load error: " + e);
    }
}



function onAssetsLoaded(e:Event):void
{
    this.cartelArray = new Array();
    var loader:Loader = Loader(e.target.loader);

    this.libreria = loader.content;//this isn't used

    //var mezclaMAtriz:Array = this.definitionsArray.slice();
    bubblesArray = [];
    for (var i:uint = 0; i < this.definitionsArray.length; i++)
    {
        var libraryDomain:ApplicationDomain = loader.contentLoaderInfo.applicationDomain;
        var mcClass:Class = libraryDomain.getDefinition(definitionsArray*.mc) as Class;
        var soundClass:Class = libraryDomain.getDefinition(definitionsArray*.sound) as Class;

        var obj:Object = new Object();
        obj.mc = new mcClass();
        obj.sound = new soundClass();

        this.bubblesArray.push(obj);
        placeBubbles();
    }
}

function placeBubbles():void
{
    var bubble:MovieClip;
    for (var i:int = 0; i < bubblesArray.length; i++)
    {
        bubble = bubblesArray*;
        bubble.addEventListener(MouseEvent.CLICK, onBubbleClick);
        bubble.x = 100 + i * 150;
        bubble.y = 100;
        addChild(bubble);
    }
    // start game
    nextChoice();
}