.timeline : SimpleTimeline
.box {
width:50px;
height:50px;
border-radius:6px;
margin-top:4px;
}
.green{
background-color:#6fb936;
}
var tm= new TimelineMax();
tm.data= {name: 'parantTimeline'}
var tm2 = new TimelineMax({onStart: myFunction, onStartParams: ["{self}"]});
tm2.to(".box", 3, {x:500});
tm.add(tm2);
function myFunction(param){
panel = document.getElementById("panel");
panel.innerHTML = '父时间轴是' + param.timeline.data.name
}
转载原创文章请注明:文章转载自:TweenMax中文网 [https://www.tweenmax.com.cn]
本文地址:https://www.tweenmax.com.cn/api/timelinemax/timeline