Featured content - switch tabs for language

I am trying to build a flash file that has 4 tabs/buttons. Rolling over a tab, shows the featured content/image for that tab. The website this is for has 5 different language sites (subdirectories) so:
1 - the featured content/image needs to be translated and
2 - one of the language sites need a different tab#3 content piece.

I’ve tried setting this up several different ways. 1st way: dynamic text fields with the translated text in the AS code… It was getting very confusing between showing content with images, translated text… lots of code for what seams like it should be simple.

I thought an easier way might be to just have a tabs_mc and an images_mc. Within both of those movie clips would be labeled frames for each language. I’m using a ‘site’ variable to tell each movie clip which frame to go to. Everything works great for the intial English version, but when I get to the “Spanish” version which needs to have a different tab3 content/image, I get TypeError: Error # 1009:
and everything works up to tab3… tab 3 and tab 4 do not work, no alpha change or image_mc change.

I think I have something messed up with the event listeners… maybe switching to a different frame within a movieclip, makes the event listeners not work? But no clue how to fix it.

For my tabs(tabs_mc):
frame “EN” has the orangeButton_mc
frame"SP" has the purpleButton_mc

For my content(images_mc):
frame “EN” has english content for orange
frame “SP” has spanish content for purple



import gs.TweenLite;
import gs.easing.*

var site:String = loaderInfo.parameters.site;

//manually setting the site variable
site = "spanish";

//tells the movie which functions to run for the various languages based on the site variable
switch (site) {
    case "english" :
        images_mc.gotoAndStop("EN");
        tabs_mc.gotoAndStop("EN");
        pink();
        blue();
        orange();
        green();
        break;
    case "spanish" :
        images_mc.gotoAndStop("SP");
        tabs_mc.gotoAndStop("SP");
        pink();
        blue();
        purple();
        green();
        break;
    default:
        images_mc.gotoAndStop("EN");
        tabs_mc.gotoAndStop("EN");
        pink();
        blue();
        orange();
        green();
}

function pink(e:Event=null):void{
    trace("pink");
    tabs_mc.pinkButton_mc.buttonMode = true;
    tabs_mc.pinkButton_mc.mouseChildren = false;
    tabs_mc.pinkButton_mc.addEventListener(MouseEvent.MOUSE_OVER, changeItem);
    tabs_mc.pinkButton_mc.addEventListener(MouseEvent.MOUSE_OUT, returnItem);
}
function blue(e:Event=null):void{
    trace("blue");
    tabs_mc.blueButton_mc.buttonMode = true;
    tabs_mc.blueButton_mc.mouseChildren = false;
    tabs_mc.blueButton_mc.addEventListener(MouseEvent.MOUSE_OVER, changeItem);
    tabs_mc.blueButton_mc.addEventListener(MouseEvent.MOUSE_OUT, returnItem);
}
function purple(e:Event=null):void{
    trace("purple");
    tabs_mc.purpleButton_tab.buttonMode = true;
    trace("purple buttonMode");
    tabs_mc.purpleButton_tab.mouseChildren = false;
    trace("purple mouseChildren");
    tabs_mc.purpleButton_tab.addEventListener(MouseEvent.MOUSE_OVER, changeItem);
    trace("purple changeItem");
    tabs_mc.purpleButton_tab.addEventListener(MouseEvent.MOUSE_OUT, returnItem);
    trace("purple returnItem");
}
function orange(e:Event=null):void{
    trace("orange");
    tabs_mc.orangeButton_mc.buttonMode = true;
    tabs_mc.orangeButton_mc.mouseChildren = false;
    tabs_mc.orangeButton_mc.addEventListener(MouseEvent.MOUSE_OVER, changeItem);
    tabs_mc.orangeButton_mc.addEventListener(MouseEvent.MOUSE_OUT, returnItem);
}

function green(e:Event=null):void{
    trace("green");
    tabs_mc.greenButton_mc.buttonMode = true;
    tabs_mc.greenButton_mc.mouseChildren = false;
    tabs_mc.greenButton_mc.addEventListener(MouseEvent.MOUSE_OVER, changeItem);
    tabs_mc.greenButton_mc.addEventListener(MouseEvent.MOUSE_OUT, returnItem);
}

//makes the tab 100% alpha and changes the content(images_mc)
function changeItem(e:MouseEvent):void{
    switch (e.currentTarget.name)
    {
        case "pinkButton_mc" :
            TweenLite.to(tabs_mc.pinkButton_mc, 1, {alpha:1, ease:Expo.easeOut});
            TweenLite.to(images_mc, 1, {y:0, ease:Expo.easeInOut});
            break;
        case "blueButton_mc" :
            TweenLite.to(tabs_mc.blueButton_mc, 1, {alpha:1, ease:Expo.easeOut});
            TweenLite.to(images_mc, 1, {y:-107, ease:Expo.easeInOut});
            break;
        case "purpleButton_mc" :
            TweenLite.to(tabs_mc.purpleButton_mc, 1, {alpha:1, ease:Expo.easeOut});
            TweenLite.to(images_mc, 1, {y:-214, ease:Expo.easeInOut});
            break;
        case "orangeButton_mc" :
            TweenLite.to(tabs_mc.orangeButton_mc, 1, {alpha:1, ease:Expo.easeOut});
            TweenLite.to(images_mc, 1, {y:-214, ease:Expo.easeInOut});
            break;
        case "greenButton_mc" :
            TweenLite.to(tabs_mc.greenButton_mc, 1, {alpha:1, ease:Expo.easeOut});
            TweenLite.to(images_mc, 1, {y:-321, ease:Expo.easeInOut});
            break;
    }
}

//changes the tab back to 50% alpha
function returnItem(e:MouseEvent):void{
    switch (e.currentTarget.name)
    {
        case "pinkButton_mc" :
            TweenLite.to(tabs_mc.pinkButton_mc, 1, {alpha:.5, ease:Expo.easeOut});
            break;
        case "blueButton_mc" :
            TweenLite.to(tabs_mc.blueButton_mc, 1, {alpha:.5, ease:Expo.easeOut});
            break;
        case "purpleButton_mc" :
            TweenLite.to(tabs_mc.purpleButton_mc, 1, {alpha:.5, ease:Expo.easeOut});
            break;
        case "orangeButton_mc" :
            TweenLite.to(tabs_mc.orangeButton_mc, 1, {alpha:.5, ease:Expo.easeOut});
            break;
        case "greenButton_mc" :
            TweenLite.to(tabs_mc.greenButton_mc, 1, {alpha:.5, ease:Expo.easeOut});
            break;
    }
}