2

I have a symbol on the stage called "cart".... inside the symbol is my graphic that has a motion path put on it to the timeline (it is called "car_v1").

On my stage I have a code to hide the symbol cart with an external CSS class :

sym.$("cart").addClass( "hidden" );  ( this is the css - .hidden { display: none; } ) 

I have a function that calls an external Javascript file.. from that external file I want to get the timeline animation to work:

Here is the function called:

checkCar();

and here is the function:

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!!!

 }
}

Can anyone help me get the play function to work from my external Javascript file?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
ristenk1
  • 435
  • 3
  • 6
  • 26

1 Answers1

4

ok, got it :)

AdobeEdge.getComposition("EDGE-172492634").getStage().getSymbol("cart").play(); //works!

ristenk1
  • 435
  • 3
  • 6
  • 26