rollover menu dock mac

import flash.display.*;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.geom.ColorTransform;
import flash.geom.Transform;
import fl.transitions.*;
import fl.transitions.easing.*;

var back_ground :yellow = new yellow();
var yellow_bg :bg = new bg();
var pink_bg :pink = new pink();
var green_bg :green = new green();
var dark_bg :dark = new dark();
var purple_bg :purple = new purple();

var bg_image:Bitmap = new Bitmap(back_ground);
var s_image:Bitmap = new Bitmap(yellow_bg);
var y_image:Bitmap = new Bitmap(pink_bg);
var p_image:Bitmap = new Bitmap(green_bg);
var t_image:Bitmap = new Bitmap(dark_bg);
var tn_image:Bitmap = new Bitmap(purple_bg);

var bg_mc:MovieClip = new MovieClip();
bg_mc.addChild(bg_image);
addChild(bg_mc);

var myTM:TransitionManager = new TransitionManager(bg_mc);


myTM.startTransition({type:Fade, direction:Transition.IN})

myTM.addEventListener("allTransitionsInDone", doneTrans);
function doneTrans(e:Event):void{
}



var s_mc:student = new student();
s_mc.height = 180; s_mc.scaleX = s_mc.scaleY;
s_mc.x = 34; s_mc.y = 214; addChild(s_mc);
s_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
s_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
s_mc.buttonMode = true;




var y_mc:young = new young();
y_mc.height = 180; y_mc.scaleX = y_mc.scaleY;
y_mc.x = 217; y_mc.y = 214; addChild(y_mc);
y_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
y_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
y_mc.buttonMode = true;

var p_mc:parent_ = new parent_();
p_mc.height = 180; p_mc.scaleX = p_mc.scaleY;
p_mc.x = 400; p_mc.y = 214; addChild(p_mc);
p_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
p_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
p_mc.buttonMode = true;

var t_mc:traveller = new traveller();
t_mc.height = 180; t_mc.scaleX = t_mc.scaleY;
t_mc.x = 585; t_mc.y = 214; addChild(t_mc);
t_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
t_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
t_mc.buttonMode = true;

var tn_mc:town_ = new town_();
tn_mc.name = "town";
tn_mc.height = 180; tn_mc.scaleX = tn_mc.scaleY;
tn_mc.x = 768; tn_mc.y = 214; addChild(tn_mc);
tn_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
tn_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
tn_mc.buttonMode = true;



var s_TM:TransitionManager = new TransitionManager(s_mc);
var y_TM:TransitionManager = new TransitionManager(y_mc);
var p_TM:TransitionManager = new TransitionManager(p_mc);
var t_TM:TransitionManager = new TransitionManager(t_mc);
var tn_TM:TransitionManager = new TransitionManager(tn_mc);
var myTween:Tween;
var xTween:Tween;
var yTween:Tween;

function onMouseOver (e:MouseEvent):void
{

switch (e.currentTarget)
{

case s_mc :
bg_mc.addChild(s_image);
//s_TM.startTransition({type:Zoom, direction:Transition.OUT})



break;

case y_mc :
bg_mc.addChild(y_image);
//y_TM.startTransition({type:Zoom, direction:Transition.OUT})
//myTween = new Tween(e.currentTarget, "none",None.easeNone,1,0,2,true);
break;

case p_mc :
bg_mc.addChild(p_image);
//p_TM.startTransition({type:Zoom, direction:Transition.OUT})
//myTween = new Tween(e.currentTarget, "alpha",None.easeNone,1,0,2,true);
break;

case t_mc :
bg_mc.addChild(t_image);
//myTween = new Tween(e.currentTarget, "alpha",None.easeNone,1,0,2,true);
//t_TM.startTransition({type:Zoom, direction:Transition.OUT})
break;

case tn_mc :
bg_mc.addChild(tn_image);
//myTween = new Tween(e.currentTarget, "alpha",None.easeNone,1,0,2,true);
//tn_TM.startTransition({type:Zoom, direction:Transition.OUT})
e.currentTarget.play();
break;

}
//var scale:Number = e.currentTarget.scaleX *1.5;
myTM.startTransition({type:Fade, direction:Transition.IN})
var xTween:Tween = new Tween(e.currentTarget, "scaleX", Regular.easeIn, 0.6, 0.8, 1, true);
var yTween:Tween = new Tween(e.currentTarget, "scaleY", Regular.easeIn, 0.6, 0.8, 1, true);
e.currentTarget.gotoAndPlay("animate");



}

function onMouseOut (e:MouseEvent):void
{

switch (e.currentTarget)
{

case s_mc :
bg_mc.removeChild(s_image);

break;

case y_mc :
bg_mc.removeChild(y_image);
break;

case p_mc :
bg_mc.removeChild(p_image);
break;

case t_mc :
bg_mc.removeChild(t_image);
break;

case tn_mc :
bg_mc.removeChild(tn_image);
break;



}
//var scale:Number = e.currentTarget.scaleX /1.5;
myTM.startTransition({type:Fade, direction:Transition.IN})
e.currentTarget.gotoAndPlay("animate_roll");
var xTween:Tween = new Tween(e.currentTarget, "scaleX", Regular.easeOut, 0.8, 0.6, 1, true);
var yTween:Tween = new Tween(e.currentTarget, "scaleY", Regular.easeOut, 0.8, 0.6, 1, true);
}


var container:MovieClip = new MovieClip();
//container.graphics.beginFill(0xFF0000);
//container.graphics.drawRect(0, 0, 970, 180);
//container.graphics.endFill();
addChild(container);
//container.width = myClipWidth;



/*var myArray = new Array();
myArray = ["student", "young", "parent_", "traveller", "town"];

var myClipWidth:int=0;
var myClipHeight:int=0;

var nextX:int =35;
var i:int;
var scrollWidth:int;
var scrollHeight:int;


for (i=0; i
var thumbClip:thumb = new thumb();
thumbClip.height = 118;
thumbClip.width = 118;
thumbClip.x = nextX;
thumbClip.y = 25;

container.addChild(thumbClip);
nextX+=185;
myClipWidth += thumbClip.width+75;
thumbClip.buttonMode = true;



}

container.x = (stage.stageWidth / 2) - (myClipWidth / 2);
//container.y = (stage.stageHeight / 2) - (container.height / 2);
*/

helpful links
http://tutorials.flashmymind.com/2009/02/zoom-website-via-actionscript-3/
http://www.parorrey.com/blog/flash-development/as3-dynamically-create-button-movieclips-and-center-align-container-movieclip-on-stage-in-flash/