读书人

flash进度统制条

发布时间: 2012-10-31 14:37:32 作者: rapoo

flash进度控制条

这是我在做flash mv时做的,看下效果:
下面是代码:
////////绝命时刻?2007年5月18日//////flash影片进度控制条?版本:1.1////////
///特点:智能判断,前期无须做任何设定工作,只需把"进度控制棒全部"这个影片剪辑(mc)拖到主场景放好位置既可使用!//
///实现功能:随意拖拽,快进,快退,暂停,播放///
拖拽?=?false;
onEnterFrame?=?function?()?{
if?(拖拽?==?false)?{
??berX?=?_parent._currentframe/(_parent._totalframes/jdb._width);
??ber._x?=?berX;
}
if?(拖拽?==?true)?{
??_parent.gotoAndStop(Math.floor((Math.abs(ber._x)+1)*(_parent._totalframes/jdb._width)));
}
if?(ber._x=jdb._width)?{
??拖拽?=?true;
}
};
ber.onPress?=?function()?{
startDrag("ber",?false,?0,?0,?jdb._width,?0);
拖拽?=?true;
};
ber.onRelease?=?ber.onReleaseOutside=function?()?{
stopDrag();
拖拽?=?false;
_parent.play();
};
Nmove.onPress?=?function()?{
拖拽?=?true;
ber._x?+=?20;
if?(ber._x>=jdb._width)?{
??ber._x?=?0;
}
};
Pmove.onPress?=?function()?{
拖拽?=?true;
ber._x?-=?20;
if?(ber._x[1b]源文件:

?[/1b]
[1b]控制棒.rar[/1b]
本文转自:http://www.5uflash.com/flashjiaocheng/Flash-loadingjiaocheng/2070.html

读书人网 >Flash

热点推荐