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));
};
};
这是我写的播放进度控制。可以拖动进度控制手柄,也可以在进度框中点击。
|
/upimg/soft/4/1_070425160924.fla |