Help loading external swf

This is the code from one of Pom’s menu systems found here…

Heres the code:


// Sets the cell that's on the scene invisible
p._visible = false;

// Button labels
texts = ["About fghj", "Portfolio", "Pom rocks", "Contact me", "cvnvbn"] ;
// Indicates which button # has been pressed
but_pressed = 0 ;

function createMenu (label_arr) {
    var size = label_arr.length;
    // Initialize variables:
    // topscale: scale of a button when it's rolled over (you can change that value)
    // lowscale: scale of a button when another button is rolled over
    cellsize = p._width ;
    topscale = cellsize + 200;
    lowscale = (size*cellsize-topscale)/(size-1);

    var i = 1;
    // Menu creation
    while (i <= size) {
        var _mc = p.duplicateMovieClip("p_" + i , 100+Number(i*size));
        _mc.textValue = label_arr[i-1] ;
        _mc.i = i;
        _mc.xscale = cellsize ;
        _mc.onRelease = _mc.onDragOver = function () {
            but_pressed = this.i ;
            this.gotoAndPlay("start") ;
        } ;
        

        _mc.onEnterFrame = function () {
            // Rescale the button
            var newxscale ;
            // Compute the new scale of the button
            if (but_pressed != 0) {
                if (but_pressed == this.i) {
                    newxscale = topscale;
                } else {
                    newxscale = lowscale;
                }
            } else {
                newxscale = cellsize;
            }
            // Classic easing equation
            var xstep = (newxscale-this.xscale)/2;
            if (this.xscale != newxscale) {
                this.xscale += xstep;
            } else {
                xstep = 0 ;
            }
            this._xscale = this.xscale;
        }
        i ++ ;
    } ;
    // Set the position of the menu cells
    this.onEnterFrame = function () {
        // Position of the first cell of the menu
        var ypos = 100;
        var xpos = 100;
        var i = 1;
        while (i <= size) {
            var mc = this["p_" + i] ;
            mc._x = xpos;
            mc._y = ypos;
            xpos = xpos + mc._width ;
            i ++ ;
        } ;
    } ;
} ;

createMenu(texts);

I have changed it slightly. Basically what i am trying to do is instead of having text on each cell I want to load an external swf into each cell.

Any help is greatly apreciated! :slight_smile: