我在舞台上有一个符号,叫做"cart";。。。。在符号里面是我的图形,上面有一个到时间线的运动路径(它被称为"car_v1")。
在我的舞台上,我有一个代码来隐藏带有外部CSS类的符号车:
sym.$("cart").addClass( "hidden" ); ( this is the css - .hidden { display: none; } )
我有一个函数,它调用一个外部Javascript文件。。从那个外部文件中,我想让时间轴动画开始工作:
这是一个名为的函数
checkCar();
这里是函数:
function checkCar() {
if (AdobeEdge.countCar == 5){
AdobeEdge.getComposition("EDGE-172492634").getStage().$("cart").removeClass( "hidden" ); // this works!
AdobeEdge.getComposition("EDGE-172492634").getStage().$("cart").play(); //doesn't work! <----this is the line I need help with!
// sym.getSymbol("cart").play(); // this works inside of edge and the timeline animation runs!!!
}
}
有人能帮我从外部Javascript文件中获得播放功能吗?
好的,明白了:)
AdobeEdge.getComposition("EDGE-172492634").getStage().getSymbol("cart").play()//作品