Passing variables between 2 .swfs (not as dynamic text)

hey everyone,

i have two .swf files (call them parent and child) sitting in one HTML page. the parent swf contains images (in movie clips) that, on click, will send an ID to the child swf, which will then display a larger image, a description, and maybe a URL.

using LocalConnection(), i can send the ID, but the only thing i can do with it is to display it in a dynamic text box.

what i WANT to do with it, is to create three empty movie clips, and dynamically load the corresponding information based on the ID from the parent swf.

in my frame:

receiving = new LocalConnection();
receiving.displayMessage = function(receivedMessage){
    if (receivedMessage != undefined) {

        // THIS JUST OUTPUTS THE VARIABLE TO A DYNAMIC TEXT BOX
        myMessage = receivedMessage;

    } else {
        trace("ERROR :: receivedMessage returned 'undefined'.");
    }
};
receiving.connect("myConnection");
stop();

and then, i have a movie clip with this:

onClipEvent(load) {    

    this.createEmptyMovieClip("my_mc", 0);
    my_mc.createEmptyMovieClip("container_mc",99);
    var my_mcl:MovieClipLoader = new MovieClipLoader();
    
    if (myMessage == 1) {
        my_mcl.loadClip("images/photo01.jpg", my_mc.container_mc);
    }
    else if (myMessage == 2) {
        my_mcl.loadClip("images/photo02.jpg", my_mc.container_mc);
    }
    // else if (myMessage == X) {
    //     // etc.
    // {
    else {
        trace("myMessage was undefined: " + myMessage);
    }
}

and it doesn’t seem to do ANYTHING. i can’t figure out the logic of where to put the movie clip, or the actionscript or if i need to put things on additional frames to make sure the LocalConnection loads first, or what. how do i access that variable (sent from the parent swf) to do conditional operations on it? the only success i’ve had in using the variable sent from the parent has been to output it to the dynamic text box??

can anyone help me out or point me to a tutorial that i can follow?

thanks in advance!
michael