Hey guys! Need a little assistance. I'm having trouble with using nested timelines in Adobe Animate. I'm unsure what the best approach is to execute a separate timeline within the main timeline. I've attempted to use both a callback from a function, and just using .add() to put it within the timeline. Can this be done? I'm sure it can, just need someone more experienced to point out where I'm going wrong.
Thanks in advance!
Here's the code:
var pw = new TimelineMax({repeat:-1})
pw.add("begin")
.to(this.pc_tools_mc, .5, {x:-164, ease:Elastic.easeOut.config(1, 0.3)}, "+=1")
.to(this.pc_logo_mc, .5, { alpha:0 })
.from(this.dw_tools_mc, .5, {x:164, ease:Elastic.easeOut.config(1, 0.3)})
.from(this.dw_logo_mc, .5, { alpha:0 })
.set(this.pc_tools_mc,{x:164})
.to(this.dw_tools_mc, .5, {x:-164, ease:Elastic.easeOut.config(1, 0.3)})
.from(this.pc_tools_mc, .5, {x:164, ease:Elastic.easeOut.config(1, 0.3)})
.from(this.pc_logo_mc, .5, { alpha:0 })
.set(this.dw_tools_mc,{x:164});
.add("end")
var tl = new TimelineMax()
tl.from(this.text1_mc, 1.5, { scaleX:0, scaleY:0, alpha:0, ease: Power1.easeIn },)
.to([this.tree_mc2, this.tree_mc3, this.tree_mc4, this.tree_mc5, this.tree_mc6, this.text1_mc], 0.5, { alpha:0 }, "+=2")
.to([this.text2_mc, this.lockup_mc], .5, { alpha:1 }, )
.to([this.text2_mc, this.tree_mc], 0.5, {alpha:0 }, "+=2")
.from(this.text3_mc, 0.5, { alpha: 0 },"+=0.5")
.add(pw.tweenTo("end"))
.to(this.lowes_mc, 0.5, { alpha:1 },)
this.stop();