onEnterFrame = function () {
jd_txt.text = "播放进度:"+_currentframe+"/"+_totalframes;
_root.jd_mc.t_mc._x = int(_root._currentframe/_root._totalframes*(300-_root.jd_mc.t_mc._width));
};
_root.jd_mc.k_mc.onPress = function() {
delete onEnterFrame;
_root.jd_mc.t_mc._x = _root.jd_mc._xmouse;
};
_root.jd_mc.k_mc.onRelease = function() {
gotoAndPlay(int(_root.jd_mc.t_mc._x/(300-_root.jd_mc.t_mc._width)*_root._totalframes));
onEnterFrame = function () {
jd_txt.text = "播放进度:"+_currentframe+"/"+_totalframes;
_root.jd_mc.t_mc._x = int(_root._currentframe/_root._totalframes*(300-_root.jd_mc.t_mc._width));
};
};
_root.jd_mc.t_mc.onPress = function() {
delete onEnterFrame;
startDrag(this, false, 0, -5, 300-this._width, -5);
_root.jd_mc.t_mc.onEnterFrame = function() {
gotoAndPlay(int(_root.jd_mc.t_mc._x/(300-_root.jd_mc.t_mc._width)*_root._totalframes));
jd_txt.text = "播放进度:"+int(_root.jd_mc.t_mc._x/(300-_root.jd_mc.t_mc._width)*_root._totalframes)+"/"+_root._totalframes;
};
};
_root.jd_mc.t_mc.onRelease = function() {
stopDrag();
delete _root.jd_mc.t_mc.onEnterFrame;
gotoAndPlay(int(_root.jd_mc.t_mc._x/(300-_root.jd_mc.t_mc._width)*_root._totalframes));
onEnterFrame = function () {
jd_txt.text = "播放进度:"+_currentframe+"/"+_totalframes;
_root.jd_mc.t_mc._x = int(_root._currentframe/_root._totalframes*(300-_root.jd_mc.t_mc._width));
};
};
这是我写的播放进度控制。可以拖动进度控制手柄,也可以在进度框中点击。
[ 本帖最后由 终极讨厌 于 2007-1-28 13:28 编辑 ]
附件
-
进度2.swf
(11.29 KB)
-
2007-1-28 13:28, 下载次数: 3489
-
进度2.fla
(64 KB)
-
2007-1-28 13:28, 下载次数: 2065