//Tween类写成的全代码弹性菜单 mcColorArray = [0xF00000, 0xFF0000, 0xFFF000, 0x0FFF00, 0xFF0FF0, 0xF0FFF0]; //定义菜单方块的颜色 mcText = ["main", "news", "blog", "downloads", "about", "links"]; //定义菜单文字 urlArray=["#1","#2","#3","#4","#5","#6"]; //定义菜单跳转到URL function createMc(mcName, mcX, mcY, mcDepths, mcColor, mcText) { _root.createEmptyMovieClip(mcName, mcDepths); with (eval(mcName)) { _x = mcX; _y = mcY; lineStyle(1, 0x000000, 0); beginFill(mcColor, 100); moveTo(30, 30); lineTo(-30, 30); lineTo(-30, -30); lineTo(30, -30); lineTo(30, 30); endFill();//定里把菜单定义为正方形 createTextField(mcText, 1, -30, -10, 60, 20); eval(mcText).text = mcText; eval(mcText).type = "dynamic"; var myTextFormat = new TextFormat(); myTextFormat.align = "center"; eval(mcText).setTextFormat(myTextFormat); } } //创建菜单选项 function TweenMove(mcID, endData) { TweenWidth = new mx.transitions.Tween(eval(mcID), "_width", mx.transitions.easing.Elastic.easeOut, eval(mcID)._width, endData, 2, true); TweenHeight = new mx.transitions.Tween(eval(mcID), "_height", mx.transitions.easing.Elastic.easeOut, eval(mcID)._height, endData, 2, true); } //创建运动 for (var i = 0; i