- TimelineMax 中文手册 / TimelineLite 中文手册
- TimelineMax()
- .add()
- .addCallback()
- .addLabel()
- .addPause()
- .remove()
- .removeCallBack()
- .removeLabel()
- .removePause()
- .to()
- .from()
- .fromTo()
- .staggerTo()
- .staggerFrom()
- .staggerFromTo()
- .set()
- delay
- paused
- useFrames
- tweens
- stagger
- align
- autoRemoveChildren
- smoothChildTiming
- repeat
- repeatDelay
- yoyo
- callbackScope
- onStart
- onStartParams
- onStartScope
- onComplete
- onCompleteParams
- onCompleteScope
- onReverseComplete
- onReverseCompleteParams
- onReverseCompleteScope
- onUpdate
- onUpdateParams
- onUpdateScope
- onRepeat
- onRepeatParams
- onRepeatScope
- .play()
- .pause()
- .paused()
- .restart()
- .resume()
- .reverse()
- .reversed()
- .seek()
- .timeScale()
- .tweenTo()
- .tweenFromTo()
- .delay()
- .repeat()
- .repeatDelay()
- .duration()
- .totalDuration()
- .progress()
- .totalProgress()
- .time()
- .totalTime()
- .endTime()
- .startTime()
- .yoyo()
- .autoRemoveChildren
- .data
- .smoothChildTiming
- .timeline
- .call()
- .clear()
- .currentLabel()
- .eventCallback()
- TimelineMax.exportRoot()
- .getActive()
- .getChildren()
- .getLabelAfter()
- .getLabelBefore()
- .getLabelsArray()
- .getLabelTime()
- .getTweensOf()
- .invalidate()
- .isActive()
- .kill()
- .recent()
- .shiftChildren()
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
.removeCallBack()
.removeCallBack( callback:Function, timeOrLabel:* ) : TimelineMax
从特定位置移除回调函数。如果没有设置时间点或者标记,则移除所有该回调函数。
//移除 3 秒处函数
myTimeline.removeCallback(myFunction, 3)
//移除标签处函数
myTimeline.removeCallback(myFunction, "myLabel")
//移除全部 myFunction 函数
myTimeline.removeCallback(myFunction, null)
.removeCallBack() 适用于 TimelineMax
.removeCallBack() 的参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
callback | Function | 是 | 移除的函数 |
timeOrLabel | * | 否 | 移除的时间点或标签,不设置则移除全部(default = null) |
.removeCallBack() 示例
移除第三秒处的函数
.box {
width:50px;
height:50px;
border-radius:6px;
margin-top:4px;
}
.green{
background-color:#6fb936;
}
panel= document.getElementById("panel");
myFunction = function(params){
panel.innerHTML= params;
}
var tm = new TimelineMax();
tm.to(".box", 5, {x:500});
tm.addCallback(myFunction,0,["0"]);
tm.addCallback(myFunction,1,["1"]);
tm.addCallback(myFunction,2,["2"]);
tm.addCallback(myFunction,3,["3"]);
tm.addCallback(myFunction,4,["4"]);
tm.addCallback(myFunction,5,["5"]);
tm.removeCallback(myFunction,3); //移除第三秒处的函数
.removeCallBack() 返回值
返回该时间轴以便链式调用。
.removeCallBack() 的补充说明
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论