有白色的线条,是因为,这个底条是50个小图组成,FLASH 处理的时候不是很完美.按理是没有的,也算是个BUG吧 ,你可以自己绘制,就不会有这个问题了.
还有就是请教各位
1:怎么设置创建出来的文本的字体大小(不用scale)
2:怎么获取文本从第一个字到最后一个字的距离
3:文本的bold属性怎么才能对中文有效
源码下载:flash_dock_menu.rar
模仿“css+js” 的那个菜单,舞台大小设置为 640*480 把这段代码插入第一帧(仅一帧)
在库中放入数组 menu_Array 中的名称为连接名的图片 和连接名为 dock_bg2 的图片
//-----------------------------代码--------------------------------------------------
import flash.display.BitmapData;
//-------------------是否缓冲(false/true)---------------------------------------
var huanchong:Boolean = false;
//-------------------若缓冲为真-缓冲大小---------------------------------------
var huanchong_num:Number = 3;
var main_bg:BitmapData = BitmapData.loadBitmap("main_bg");
//-------------------铺背景--------------------------------
for (var j:Number = 0; j<=767; j++) {
this.createEmptyMovieClip("bg_mc"+j, this.getNextHighestDepth());
this["bg_mc"+j].attachBitmap(main_bg, this.getNextHighestDepth());
this["bg_mc"+j]._x = j*20-Math.floor(j/32)*640;
this["bg_mc"+j]._y = Math.floor(j/32)*20;
}
//-----------------链接名称--------------------------------
var menu_Array:Array = new Array();
menu_Array = ["主页", "联系", "Protfolio", "音乐", "电影", "历史", "日历", "链接", "RSS", "RSS2"];
//-----------------创建一个底条位图实例-------------------------
var flash8__kingofkofs:BitmapData = BitmapData.loadBitmap("dock_bg");
//-----------------创建一个MC用来加载位图对象----------------
_root.createEmptyMovieClip("setoff", _root.getNextHighestDepth());
for (var j:Number = 0; j<=menu_Array.length*4-1+2; j++) {
_root.setoff.createEmptyMovieClip("setoff_son"+j, _root.setoff.getNextHighestDepth());
_root.setoff["setoff_son"+j].attachBitmap(flash8__kingofkofs, _root.getNextHighestDepth(), "auto", true);
_root.setoff["setoff_son"+j]._x = j*10-210;
_root.setoff["setoff_son"+j]._y = -60;
_root.setoff._x = Stage.width/2-5;
_root.setoff._y = Stage.height;
_root.setoff._;
_root.setoff.ori_width = _root.setoff._width;
}
//-----------------创建MC以及加载库中的位图---------------------
for (var j:Number = 0; j<=menu_Array.length-1; j++) {
this[img[j]] = BitmapData.loadBitmap(menu_Array[j]);
_root.createEmptyMovieClip(menu_Array[j], _root.getNextHighestDepth());
_root[menu_Array[j]].createEmptyMovieClip("mc", _root.getNextHighestDepth());
_root[menu_Array[j]].mc.attachBitmap(this[img[j]], _root.getInstanceAtDepth(), "auto", true);
_root[menu_Array[j]].mc._;
_root[menu_Array[j]].mc._;
_root[menu_Array[j]].mc._x = -_root[menu_Array[j]]._width/2;
_root[menu_Array[j]].mc._y = -_root[menu_Array[j]]._height;
_root[menu_Array[j]]._x = j*_root[menu_Array[j]]._width+(Stage.width-_root[menu_Array[j]]._width*menu_Array.length)*0.5+15;
_root[menu_Array[j]]._y = Stage.height;
_root[menu_Array[j]].ori_x = _root[menu_Array[j]]._x;
_root[menu_Array[j]].ori_y = _root[menu_Array[j]]._y;
_root[menu_Array[j]].ori_wid = _root[menu_Array[j]]._width;
_root[menu_Array[j]].ori_hei = _root[menu_Array[j]]._height;
//trace(_root[menu_Array[j]].ori_x);
}
var all_wid:Number = 0;
_root.createEmptyMovieClip("point", _root.getNextHighestDepth());
setInterval(function () {
updateAfterEvent();
_root.all_wid = _root[menu_Array[0]]._width+_root[menu_Array[1]]._width+_root[menu_Array[2]]._width+_root[menu_Array[3]]._width+_root[menu_Array[4]]._width+_root[menu_Array[5]]._width+_root[menu_Array[6]]._width+_root[menu_Array[7]]._width+_root[menu_Array[8]]._width+_root[menu_Array[9]]._width;
_root.setoff._width = (_root.all_wid-400)+_root.setoff.ori_width;
if (!huanchong) {
_root.point._x = _xmouse;
_root.point._y = _ymouse;
} else {
_root.point._x += (_xmouse-_root.point._x)/huanchong_num;
_root.point._y += (_ymouse-_root.point._y)/huanchong_num;
}
for (var j:Number = 0; j<=menu_Array.length-1; j++) {
//-------------------计算及设置鼠标滑过时MC的高低----------------
if (_root.point._x>=_root[menu_Array[j]].ori_x && _root.point._x-_root[menu_Array[j]].ori_x<=_root[menu_Array[j]].ori_wid*2.5 && _root.point._y<_root[menu_Array[j]]._y && _root[menu_Array[j]]._y-_root.point._y<=_root[menu_Array[j]].ori_hei*2.5) {
_root["percent_x"+j] = 1-(_root.point._x-_root[menu_Array[j]].ori_x)/(_root[menu_Array[j]].ori_wid*2.5);
_root["percent_y"+j] = 1-((_root[menu_Array[j]]._y-_root[menu_Array[j]].ori_wid)-_root.point._y)/(_root[menu_Array[j]].ori_hei*2.5-20);
if (_root["percent_y"+j]>=1) {
_root["percent_y"+j] = 1;
}
_root["percent_xy"+j] = _root["percent_x"+j]*_root["percent_y"+j];
_root[menu_Array[j]]._percent_xy"+j]*60+40;
_root[menu_Array[j]]._percent_xy"+j]*60+40;
} else if (_root.point._x<_root[menu_Array[j]].ori_x && _root[menu_Array[j]].ori_x-_root.point._x<_root[menu_Array[j]].ori_wid*2.5 && _root.point._y<_root[menu_Array[j]]._y && _root[menu_Array[j]]._y-_root.point._y<=_root[menu_Array[j]].ori_hei*2.5) {
_root["percent_x"+j] = 1-(_root[menu_Array[j]].ori_x-_root.point._x)/(_root[menu_Array[j]].ori_wid*2.5);
_root["percent_y"+j] = 1-((_root[menu_Array[j]]._y-_root[menu_Array[j]].ori_wid)-_root.point._y)/(_root[menu_Array[j]].ori_hei*2.5-20);
if (_root["percent_y"+j]>=1) {
_root["percent_y"+j] = 1;
}
_root["percent_xy"+j] = _root["percent_x"+j]*_root["percent_y"+j];
_root[menu_Array[j]]._percent_xy"+j]*60+40;
_root[menu_Array[j]]._percent_xy"+j]*60+40;
} else if (huanchong) {
_root[menu_Array[j]]._width -= (_root[menu_Array[j]]._width-40)/5;
_root[menu_Array[j]]._height -= (_root[menu_Array[j]]._height-40)/5;
} else {
_root[menu_Array[j]]._;
_root[menu_Array[j]]._;
}
//-------------------菜单提示TXT----------------
_root[menu_Array[j]].onRollOver = function() {
this.menu_name = true;
this.swapDepths(_root.getNextHighestDepth());
};
_root[menu_Array[j]].onRollOut = function() {
this.menu_name = false;
};
if (_root[menu_Array[j]].menu_name) {
_root.createTextField(menu_Array[j]+"txt", _root.getNextHighestDepth(), -10, -40, 50, 30);
_root[menu_Array[j]+"txt"].bold = true;
_root[menu_Array[j]+"txt"].text = menu_Array[j];
_root[menu_Array[j]+"txt"]._xscale = _root[menu_Array[j]+"txt"]._yscale=150;
_root[menu_Array[j]+"txt"].textColor = 0x000000;
_root[menu_Array[j]+"txt"]._x = _root[menu_Array[j]]._x-_root[menu_Array[j]+"txt"]._width/2;
_root[menu_Array[j]+"txt"]._y = Stage.height-_root[menu_Array[j]]._height-20;
_root[menu_Array[j]+"txt"].selectable = false;
} else {
_root[menu_Array[j]+"txt"].removeTextField();
}
}
_root[menu_Array[0]]._x = _root.setoff._x-_root.setoff._width/2+_root[menu_Array[0]]._width/2+10;
for (var j:Number = 1; j<=menu_Array.length-1; j++) {
_root[menu_Array[j]]._x = _root[menu_Array[j-1]]._x+_root[menu_Array[j-1]]._width/2+_root[menu_Array[j]]._width/2;
}
}, 10);
关键字: flash放大镜效果 flash图片效果 flash图片切换效果 flash图片轮换效果 flash图片过渡效果 flash旋转图片效果 flash 图片显示效果 flash制作图片效果 flash图片移动效果 flash图片转换效果
荒野乱斗国际版 (BrawlStars)最新版本v56.274
下载一波超人内置修改器菜单版 安卓版v1.0.2
下载敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载继承了一座戏园子无限声望铜钱版 内置菜单最新版v1.7
继承了一座戏园子折相思版是游戏的破解版本,在该版本中为玩家提
山河半世橙光清软金手指版 无限鲜花v3.24
山河半世是一款超级好玩的橙光恋爱游戏,在游戏中玩家们需要扮演
蓬莱手游折相思版 安卓版v1.0.0
蓬莱免广告版是游戏的修改版本,在该版本中为玩家去除了广告,玩
当红影后橙光游戏破解版2025 最新版v1.0
当红影后橙光破解版是一款超级好玩的娱乐圈题材的橙光游戏,在这
忽然成了万人迷清软完结版 无限鲜花版v12.15
忽然成了万人迷破解版是一款非常好玩的男性向橙光游戏,在有一天